apache UserDir problem

Discuss Applications
Post Reply
X11
guru
guru
Posts: 676
Joined: Sun Jan 19, 2003 11:09 pm
Location: Australia
Contact:

apache UserDir problem

Post by X11 »

I cannot get user directories to work, the public_html folder in my homedirectory has 755 permissions set, and these are the directives to httpd...

Code: Select all

UserDir /home/*/public_html
UserDir disabled
UserDir enabled x11

<Directory /home/*/public_html/>
        Options Indexes
        Order allow,deny
        Allow from all
</Directory>
<Directory /home/*/public_html/cgi-bin/>
        Options ExecCGI
        SetHandler cgi-script
</Directory>
Somehow, I thought that would work. I just get a permission denied error (403).

User avatar
Void Main
Site Admin
Site Admin
Posts: 5716
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA
Contact:

Post by Void Main »

How about the permissions on your actual home directory? The apache user needs at "least" execute permission on your home directory for this to work:

$ chmod a+x ~

X11
guru
guru
Posts: 676
Joined: Sun Jan 19, 2003 11:09 pm
Location: Australia
Contact:

Post by X11 »

Hmm just tried that its not working still :/

X11
guru
guru
Posts: 676
Joined: Sun Jan 19, 2003 11:09 pm
Location: Australia
Contact:

Post by X11 »

Just checked dmesg and I am getting these errors as well from SELinux...

Code: Select all

audit(1144089403.171:61): avc:  denied  { getattr } for  pid=7134 comm="httpd" name="public_html" dev=dm-0 ino=14862714 scontext=user_u:system_r:httpd_t:s0 tcontext=user_u:object_r:user_home_t:s0 tclass=dir
(Note: FC5 system)

I have checked the security settings and it says its set to allow httpd to read user home directories. That was one of the first things I checked.

User avatar
Void Main
Site Admin
Site Admin
Posts: 5716
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA
Contact:

Post by Void Main »

Are you running SELinux? Turn that crap off. :)

# system-config-securitylevel

Post Reply