Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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] (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/

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

[huckphin@crhyner-workbox]/% find / . -name '**' 2> /dev/null

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
    Order allow,deny
    Allow from all
    Order deny,allow
    Deny from all
share|improve this question

Actually, when Apache refers to /~foo/ in its log files, it is talking about the url, and not the file system path. In other words, there's nothing suggesting that it's looking at the wrong place.

I assume you also have the userdir module enabled, not just the configuration? What about the Directory configuration for /home/*/public_html? Also, what about the file system permissions for /home?

share|improve this answer
make sure the user's directory can be traversed by apache. it needs full read permissions to /home/user/public_html i.e. chmod 755 /home/user/public_html and execute permissions on /home/user/, i.e. chmod 711 /home/user if i recall correctly, 711 is the minimum. – cpbills May 15 '10 at 16:16
Hi cpbills, thanks for the suggestion. I have logged in as the apache user using root, and I am able to traverse the /home/user/public_html directory, so I believe that I have set the permissions correctly. I do have /home/user set to 755, and /home/user/public_html set to 755, and everything under /home/user/public_html/* to 777, so I think that my permissions are set. – Huckphin May 17 '10 at 2:30
Hi andol. I have added my settings for <Directory>. Also, my permissions for home is set to 755. – Huckphin May 17 '10 at 2:38

I'm a little upset. I found the answer, but it was just a guess. Sure enough, nothing about my configuration was incorrect. I stopped SELinux by going to System -> Administration -> SELinux Management (I am using GNOME for my window manager, btw), and shutdown SELinux, and I was able to view my user directory webpage.

So, I have found out that SELinux was causing the problem. I am not sure if I want to go through and enforce a policy specifically for SELinux. I think that might be another thread, but I have found the problem!

Thank you for the help, though. It made me think in a different direction, which helped me come to this conclusion! I appreciate the help!

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.