LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Mandriva (https://www.linuxquestions.org/questions/mandriva-30/)
-   -   Apache folder permissions (https://www.linuxquestions.org/questions/mandriva-30/apache-folder-permissions-389321/)

anothernixconvert 12-04-2005 11:19 PM

Apache folder permissions
 
So I've recently installed phpBB2 onto my Mandriva box. I'm having a slight problem with folder permissions though.

I have Apache2, all the web files are at

/var/www/

edited the commonhttpd.conf file to include an alias for

/var/www/phpBB2/ (which is where I put my phpBB2 folder)

I kept getting a 403 (Forbidden) error while trying to access the phpBB2 folder. So, I also added in the following lines

<Directory /var/www/phpBB2>
AllowOverride All
Options -Indexes
<IfModule mod_access.c>
Order allow,deny
Allow from all
</IfModule>
</Directory>

which allows me to do pretty much everything I want to do with the exception of uploading avatars or letting the program create any other new files in a subfolder of the phpBB2 folder. Is there any way to make a recursive listing I can add to the commonhttpd.conf file that will allow read/write permissions to the whole phpBB2 folder?

The folder permissions themselves seem to be fine with

drwxr-xr-x

I think it might have to do with being in the /var/www folder. Should I maybe just think of relocating the whole web directory to another spot?

Thanks!
-Paul

anothernixconvert 12-04-2005 11:47 PM

Oh, and I noticed that the phpBB2 folder was still owned and grouped by root. I changed both of these to apache as the www folder is.

I thought for a minute that I might have it had it in the wrong place, but tried putting it in

/var/www/html/phpBB2

instead of

/var/www/phpBB2

without success.

anothernixconvert 12-04-2005 11:55 PM

Alright... so, it turns out that I'm an idiot.

So, for anybody who did the same thing I did, here are the steps:

With MySQL server, php, and apache2 installed, put the phpBB2 directory in
/var/www/phpBB2

Now, edit /etc/httpd/conf/commonhttpd.conf

Add an alias in the form of

Alias /phpBB2/ /var/www/phpBB2/

Also, add in:

<Directory /var/www/phpBB2>
AllowOverride All
Options -Indexes MultiViews
Order allow,deny #no spaces!
Allow from all
</Directory>

Now, save this.

cd to /var/www and chmod -R apache phpBB2, also chgrp -R apache phpBB2.

Type in

/etc/init.d/httpd restart

to restart apache. Should work. This is all probably going to have to be done as root.


All times are GMT -5. The time now is 04:49 AM.