LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 01-16-2002, 05:04 PM   #1
aeshley
LQ Newbie
 
Registered: Dec 2001
Location: Australia
Distribution: Red Hat 7.3
Posts: 27

Rep: Reputation: 15
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
 
Old 01-16-2002, 07:48 PM   #2
finegan
LQ Guru
 
Registered: Aug 2001
Location: Dublin, Ireland
Distribution: Slackware
Posts: 5,700

Rep: Reputation: 72
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
 
Old 01-16-2002, 08:25 PM   #3
aeshley
LQ Newbie
 
Registered: Dec 2001
Location: Australia
Distribution: Red Hat 7.3
Posts: 27

Original Poster
Rep: Reputation: 15
Unhappy still no work!

did chmod a+r to my user account, but i still get the same message!
 
Old 01-17-2002, 02:38 AM   #4
finegan
LQ Guru
 
Registered: Aug 2001
Location: Dublin, Ireland
Distribution: Slackware
Posts: 5,700

Rep: Reputation: 72
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
 
Old 01-17-2002, 03:43 PM   #5
aeshley
LQ Newbie
 
Registered: Dec 2001
Location: Australia
Distribution: Red Hat 7.3
Posts: 27

Original Poster
Rep: Reputation: 15
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
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache UserDir Problem sbb Linux - Software 13 04-10-2006 06:29 PM
apache UserDir public_html problem aeshley Linux - Newbie 4 11-29-2004 01:58 AM
Apache UserDir Abbaddon Slackware 12 09-15-2004 11:28 AM
UserDir public_html - Problems with CGI wzws Linux - General 3 03-11-2004 07:40 AM
Problem with Apache and public_html MiB_24 Linux - General 3 07-28-2002 12:33 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 05:14 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration