LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   apache UserDir public_html problem (https://www.linuxquestions.org/questions/linux-networking-3/apache-userdir-public_html-problem-11933/)

aeshley 01-16-2002 05:04 PM

apache UserDir public_html problem
 
Hi

This is a simple problem which i am sure will have a simple answer.

I am tring to set a user directory with web content on my linux web server. When i enter the url i get:
Forbidden
You don't have permission to access /~ashley on this server.

Under the httpd.conf file i have the line:
UserDir public_html

The permissions on the index.html file are world readable.
I can access web files within /var/www/html no probs too.

Any help much appreciated. Thanks.

Ashley

finegan 01-16-2002 07:48 PM

The /home/user account has to be world readable as well. There's no need to make the files within it world readable however. This bugged me for hours on my first apache install.

-Cheers,

Finegan

aeshley 01-16-2002 08:25 PM

still no work!
 
did chmod a+r to my user account, but i still get the same message!

finegan 01-17-2002 02:38 AM

Okay... I'm confused now. Lemme post what I have and know works and see if everything matches. Most of this is basic defaults:

Slack8.0, Apache 1.3.20 with nothing cute enabled, like PHP or SSL

/etc/apache/httpd.conf
--------------------------------------------
# UserDir: The name of the directory which is appended onto a user's home
# directory if a ~user request is received.
#
<IfModule mod_userdir.c>
UserDir public_html
</IfModule>

#
# Control access to UserDir directories. The following is an example
# for a site where these directories are restricted to read-only.
#
<Directory /home/*/public_html>
AllowOverride All
# AllowOverride FileInfo AuthConfig Limit
# Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
# <Limit GET POST OPTIONS PROPFIND>
# Order allow,deny
# Allow from all
# </Limit>
# <LimitExcept GET POST OPTIONS PROPFIND>
# Order deny,allow
# Deny from all
# </LimitExcept>
</Directory>
--------------------------------------------
/home:

4 drwx--x--x 17 clair users 4096 Jan 15 02:54 clair/
4 drwxr-xr-x 4 erin erin 4096 Dec 4 17:06 erin/
4 drwxr-xr-x 37 ferrous ferrous 4096 Jan 16 23:03 ferrous/
4 drwxr-xr-x 32 fin fin 4096 Jan 17 03:16 fin/

(fin, ferrous, and erin have public_html dirs, clair doesn't)

---------------------------------------------
/home/fin

4 drwx------ 2 fin fin 4096 Jan 17 02:40 mail/
4 drwx------ 2 fin fin 4096 Mar 10 2001 nsmail/
8 -rw-r--r-- 1 fin fin 5274 Dec 28 21:15 plebeian.jpg
4 drwxr-xr-x 8 fin fin 4096 Jan 13 04:09 public_html/
24 -rw-r--r-- 1 fin fin 22635 Nov 7 03:10 satellite_pro_430cdt.pdf
4 drwxr-xr-x 6 fin fin 4096 Jan 8 13:22 stuph/
4 -rw-r--r-- 1 fin fin 65 Nov 7 15:18 tablesMASQ

----------------------------------------------

/home/fin/public_html

8 -rw-r--r-- 1 fin fin 5228 Dec 14 01:06 fixed.html
4 drwxr-xr-x 2 fin fin 4096 Aug 20 19:47 hitched/
4 drwxr-xr-x 3 fin fin 4096 Jan 13 05:10 images/
8 -rwxr-xr-x 1 fin fin 5973 Jan 13 04:08 index.html*
8 -rw-r--r-- 1 fin fin 7483 Jan 13 04:39 links.html
4 drwxr-xr-x 2 fin fin 4096 Jun 5 2001 maintemp/
4 -rwxr-xr-x 1 fin fin 1130 May 20 2001 maryland1.html*

----------------------------------------------

Does that look about right?

If all of the file permissions down the line match up, more or less... then its most likely something weirder with httpd.conf.

Cheers,

Finegan

aeshley 01-17-2002 03:43 PM

problem fixed
 
thanks for the help Finegan

turns out the problem was the httpd.conf file. i added:

# UserDir: The name of the directory which is appended onto a user's home
# directory if a ~user request is received.
#
<IfModule mod_userdir.c>
UserDir public_html
</IfModule>

and

#
# Control access to UserDir directories. The following is an example
# for a site where these directories are restricted to read-only.
#
<Directory /home/*/public_html>
AllowOverride All
# AllowOverride FileInfo AuthConfig Limit
# Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
# <Limit GET POST OPTIONS PROPFIND>
# Order allow,deny
# Allow from all
# </Limit>
# <LimitExcept GET POST OPTIONS PROPFIND>
# Order deny,allow
# Deny from all
# </LimitExcept>
</Directory>

ash


All times are GMT -5. The time now is 06:17 AM.