Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm playing around with the UserDir function in apache: http://httpd.apache.org/docs/2.0/mod/mod_userdir.html

Here is my configuration:

<IfModule mod_userdir.c>

        UserDir enabled user
        UserDir public_html

</IfModule>

<Directory "/home/*/public_html">
    AllowOverride FileInfo AuthConfig Limit Indexes
    Options MultiViews Indexes 
    Allow from all
    Order deny,allow

</Directory

It kept generating a 403 errror access denied. It wasn't until I added executable on /home/user directory:

chmod 711 /home/user

The public_html already had o+r which was logical for the apache user to read the contents, but why would executable need to be added on the base folder?

It's all working. I'm just curious as to why this is the case.

share|improve this question

2 Answers 2

up vote 3 down vote accepted

The executable bit on a directory determines permissions for directory traversal.

share|improve this answer

According to the FAQ

In order to serve files, Apache must have the proper permission granted by the operating system to access those files. In particular, the User or Group specified in httpd.conf must be able to read all files that will be served and search the directory containing those files, along with all parent directories up to the root of the filesystem

This is just the nature of being able to open directories to get to the files.

share|improve this answer

Your Answer

 
discard

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.