Apache Simple Configuration Issue: Setting up per-user directory permission denied problem

Posted by Huckphin on Server Fault See other posts from Server Fault or by Huckphin
Published on 2010-05-15T15:17:12Z Indexed on 2010/05/17 3:01 UTC
Read the original article Hit count: 512

Filed under:
|
|

Hello.

I am just getting Apache 2.2 running on Fedora 13 Beta 64-bit. I am running into issues setting my per-user directory. The goal is to make localhost/~user map to /home/~user/public_html. I think that I have the permissions right because I have 755 to /home/~user, and I have 755 to /home/~user/public_html/ and I have 777 for all contents inside of /home/~user/public_html/ recursively set.

My mod_userdir configuration looks like this:

<IfModule mod_userdir.c>
#
# UserDir is disabled by default since it can confirm the presence
# of a username on the system (depending on home directory
# permissions).
#
UserDir disabled root
UserDir enabled huckphin

#
# To enable requests to /~user/ to serve the user's public_html
# directory, remove the "UserDir disabled" line above, and uncomment
# the following line instead:
#
UserDir public_html

The error that I am seeing in the error log is this:

[Sat May 15 09:54:29 2010] [error] [client 127.0.0.1] (13)Permission denied: access to /~huckphin/index.html denied

When I login as the apache user, I know that /~huckphin does not exist, and this is not what I want. I want it to be accessing ~huckphin, not /~huckphin. What do I need to change on my configuration for this to work?

[Added after comments]

Hi Andol, thank you for your suggestions. So, first off, you said that you assume that I have the userdir module enabled, but I am not sure what that means exactly. That could be part of the problem.

I do have the Module loaded, using the LoadModule directive. I have this:

LoadModule userdir_module modules/mod_userdir.so

I also did a find on where mod_userdir is, and I found it located here:

[huckphin@crhyner-workbox]/% find / . -name '*mod_userdir.so*' 2> /dev/null
/usr/lib64/lighttpd/mod_userdir.so
/usr/lib64/httpd/modules/mod_userdir.so

Is there something else I need to enable?

Also, my directory configuration was mentioned. I have uncommented the default configuration given. I have not looked into what all of the configurations mean, and this could probably explain the issue. Here is the Directory that I have for the user directories:

<Directory "/home/*/public_html">
AllowOverride FileInfo AuthConfig Limit
Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
<Limit GET POST OPTIONS>
    Order allow,deny
    Allow from all
</Limit>
<LimitExcept GET POST OPTIONS>
    Order deny,allow
    Deny from all
</LimitExcept>
</Directory>

© Server Fault or respective owner

Related posts about apache

Related posts about apache2.2