I am somewhat stumped here. I have just installed Fedora Core 11 and am trying to setup httpd to allow UserDir in ~foo/public_html. I cannot seem to access foo's home page index.html, I am getting
Quote:
403 Forbidden
You don't have permission to access /~foo/index.html on this server.
|
The index.html in /var/www/html works fine and all permissions on foo's home directory allow apache to read the file index.html.
Here are relevant pieces of httpd.conf:
Quote:
Listen 8080
<IfModule mod_userdir.c>
UserDir public_html
</IfModule>
<Directory /home/*/public_html>
AllowOverride All
</Directory>
DirectoryIndex index.html index.html.var
|
Here is the output in the error log:
Quote:
[Sun Jul 19 14:17:50 2009] [error] [client ::1] (13)Permission denied: file permissions deny server access: /home/foo/public_html/index.html
|
Here are the permissions of all of the relevant files:
Quote:
[foo@myhost ~]$ ll -d / /home /home/foo /home/foo/public_html /home/foo/public_html/index.html
drwxr-xr-x. 28 root root 4096 2009-07-18 09:51 /
drwxr-xr-x. 4 root root 4096 2009-07-19 13:48 /home
drwxr-xr-x. 6 foo foo 4096 2009-07-19 14:12 /home/foo
drwxr-xr-x. 2 foo foo 4096 2009-07-19 14:07 /home/foo/public_html
-rw-rw-r--. 1 foo foo 208 2009-07-19 14:07 /home/foo/public_html/index.html
|
The url that I am using is:
if I become the apache user I can access the file:
Quote:
[root@myhost foo]# su - apache
[apache@myhost ~]$ cat /home/foo/public_html/index.html
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>Foo's Home Page</title>
</head><body>
<h1>Foo's Home Page</h1>
<p>This is Foo's Home Page.</p>
<hr>
<address></address>
</body></html>
|
If I do an strace of the httpd process(es) I get:
Quote:
stat64("/home/foo/public_html/index.html", {st_mode=S_IFREG|0664, st_size=208, ...}) = 0
open("/home/foo/public_html/index.html", O_RDONLY|O_LARGEFILE) = -1 EACCES (Permission denied)
|
The httpd processes are owned by apache.
Clearly the user apache has permission to read the file, httpd is set correctly to read index.html and the url is finding the right file. It just seems that the httpd process has no permission to access it.
So what am I missing here?
Any hints or help would really be appreciated.
Thanks.