Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. 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 installed Apache via yum on CentOS 6.4. I changed the DocumentRoot in /etc/httpd/conf/httpd.conf to point to /home/djc/www:

DocumentRoot "/home/djc/www"
<Directory "/home/djc/www">
    Options Indexes FollowSymLinks
    AllowOverride None
    Order allow,deny
    Allow from all

FS permissions:

djc@vm ~ $ ls -l
drwxrwxr-x.  3 djc djc   4096 Jan 14 11:17 www

No SELinux:

djc@vm ~ $ sestatus
SELinux status:                 disabled

What am I missing?

share|improve this question
What about ls -ld ~? – janos Jan 14 '14 at 10:25
Doh! Thanks, that's it. If you write it as an answer, I'll accept it. – djc Jan 14 '14 at 10:27
Ok, I made it an answer ;-) – janos Jan 14 '14 at 10:38
up vote 4 down vote accepted

For the new docroot to be accessible by Apache, the Apache users must be able to access all directories in the path leading up to /home/djc/www. So even though /home/djc/www is accessible to everyone, /home/djc must be executable by the Apache user. so for example if you have:

$ ls -ld ~
drwx------    1 djc   djc        0 Jan 13 15:16 /home/djc

You can make it accessible like this and it should be enough:

$ chmod o+x ~
$ ls -ld ~
drwx-----x    1 djc   djc        0 Jan 13 15:16 /home/djc
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.