LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-26-2004, 04:18 AM   #1
sigurdne
LQ Newbie
 
Registered: Jul 2002
Posts: 4

Rep: Reputation: 0
Post access 403 forbidden - user_dir


I can't access the localhost/~user

the users public_html (and a index.html) is created and world readable (in fact 777 !)

in httpd.conf:

<Directory /home/*/public_html>
Options Indexes FollowSymLinks
Order allow,deny
Allow from all
</Directory>

Apache-PREFORK-AdvancedExtranetServer/2.0.52 (Mandrakelinux/8mdk) Hardened-PHP/4.3.9 Server at 127.0.0.1 Port 80

Regards

Sigurd
 
Old 11-26-2004, 04:59 AM   #2
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 64
I had to include the following to enable this on my setup:
Code:
<IfModule mod_userdir.c>
    UserDir public_html
</IfModule>

UserDir enabled masterc
And obviously, this enabled for my user, masterc.

Cool
 
Old 11-26-2004, 07:39 AM   #3
sigurdne
LQ Newbie
 
Registered: Jul 2002
Posts: 4

Original Poster
Rep: Reputation: 0
It didn't help:
I have

Code:
LoadModule userdir_module     modules/mod_userdir.so
Code:
AddModule mod_userdir.c
Code:
<IfModule mod_userdir.c>
UserDir public_html
</IfModule>
UserDir enabled sigurd sn5607 kornelius
Sigurd
 
Old 11-27-2004, 01:56 AM   #4
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 64
I'm assuming you restarted apache after making the changes? If so, post up the permissions on your home directory as well as public_html ( ls -lh )

Cool
 
Old 11-27-2004, 04:56 AM   #5
sigurdne
LQ Newbie
 
Registered: Jul 2002
Posts: 4

Original Poster
Rep: Reputation: 0
The home directory was 700 but when I changed it to 701 the access was permitted (it did'nt help to add read rights).
At this stage - public_html is 777.
Is this really necessary giving executable right to everyone?

Sigurd
 
Old 11-27-2004, 05:36 AM   #6
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 64
No, you can go about it other ways. chgroup apache, change the group apache runs as to users, add apache to the users group, create an all new group, chgroup to that. Play with the perms to suit your needs, I personally don't have quite the strict perms you do on my home dir, it's not like I am hiding the code to unlock a nuclear war head in my home directory and don't want any other user on the system to read it

Cool
 
Old 11-27-2004, 06:55 AM   #7
sigurdne
LQ Newbie
 
Registered: Jul 2002
Posts: 4

Original Poster
Rep: Reputation: 0
Thumbs up

Ok thanks for the help - it really helped me a lot

Sigurd
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Error 403 Forbidden access in Apache anoop_cn Linux - Software 1 09-21-2004 10:32 AM
Access Forbidden 403 for PHP info page. Kitara Linux - Software 5 05-24-2004 04:41 AM
access 403 forbidden - questions from a newbie vr6stress Linux - Newbie 1 05-21-2004 08:31 AM
Apache - 403 Forbidden - Access to Subdirectories dieter Linux - Networking 2 03-25-2004 01:51 PM
403 forbidden access on httpd service roguecoolman Linux - Newbie 1 09-23-2003 06:08 PM


All times are GMT -5. The time now is 08:31 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration