Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
01-16-2002, 06:04 PM
|
#1
|
LQ Newbie
Registered: Dec 2001
Location: Australia
Distribution: Red Hat 7.3
Posts: 27
Rep:
|
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
|
|
|
01-16-2002, 08:48 PM
|
#2
|
LQ Guru
Registered: Aug 2001
Location: Dublin, Ireland
Distribution: Slackware
Posts: 5,700
Rep:
|
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
|
|
|
01-16-2002, 09:25 PM
|
#3
|
LQ Newbie
Registered: Dec 2001
Location: Australia
Distribution: Red Hat 7.3
Posts: 27
Original Poster
Rep:
|
still no work!
did chmod a+r to my user account, but i still get the same message!
|
|
|
01-17-2002, 03:38 AM
|
#4
|
LQ Guru
Registered: Aug 2001
Location: Dublin, Ireland
Distribution: Slackware
Posts: 5,700
Rep:
|
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
|
|
|
01-17-2002, 04:43 PM
|
#5
|
LQ Newbie
Registered: Dec 2001
Location: Australia
Distribution: Red Hat 7.3
Posts: 27
Original Poster
Rep:
|
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 11:21 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|