Click to See Complete Forum and Search --> : Apache 403 Error


Skywolf
12-01-2002, 04:17 PM
Well, here's the situation:

I installed Mandrake Linux 9.0 with Apache. I've made sure Apache group is part of my ~user groups, I've chmod the files in the user directory to be read by all.

And, when serving webpages from the root (/var/www/html) Apache serves them up just fine.

However, when trying to access a user directory (in this case (as example) http://www.website.com/~user) I get the 403 forbidden error.

I've tried adding the following to commonhttpd.conf:

<Directory /home/user>
Options -All -Multiview
AllowOverride All
Order allow,deny
Allow from all
</Directory>

to no avail. Also tried changing the Directory to /home/~user to no avail.

I'm running in runlevel 3, with little mods from the installation (if any).

Any ideas? I'm stuck (after 10 hours of frustration)

untoldone
12-01-2002, 04:50 PM
Im sure theres a beter way of doin this .. but the way i did it was a made a a hourly cron job that created a link to the actual directories within subdomains root dir with the line

ln -s /home/* /var/www/host/ > /var/log/tmp/mapwebtmp.txt

and i had apache a memeber of the user group along with all the users i wanted to have a web site with there directories chmod to 740...

Thanatos
12-01-2002, 06:48 PM
Here's what I did:ln -s /home/pages/ ./home
chmod 777 ./home (needs to be 777 or they don't get permission to the directories)

go to your home dir and chmod 777 pages (same reason. pages is my user html directory)

chmod /home directory to 755 (same reason, you have to be able to execute a directory for it to run, I think)

set all directories that your users will use to 777 or 755 (again, same reason)

whatever you have as an FTP server will dictate the file permissions of files uploaded by your users. Good rule of thumb: directories need to be executable, files do NOT! that creates a security risk. If you want people to be able to play videos or something directly off the server without downloading them first, you will have to set them to execute though.

Thanatos
12-01-2002, 06:55 PM
Oh, and....that softlink (ln -s thing) goes in your document root, fyi...and for the FTP from external users, you should probably chown the directory to them....and take away write capabilities for anyone not them. (chmod 753, I think )

Skywolf
12-02-2002, 01:23 AM
Thanks for the ideas, guys...

Thanatos: I tried your idea, and it worked, but I have to have the trailing "/" at the end, now...

Any idea how to fix that one?

:) Thanks for the help, though! This the closest I've gotten in a LOONG time!

-S