Rick Hurst Web Developer in Bristol, UK


forbidden access apache userdir

After setting UserDir (in /etc/httpd/conf/httpd.conf) to use public_html (so that user accounts would have a website at servername/~username) I was getting a “forbidden” message when attempting to browse to the directory or files within it.

Fixed by:-

– setting permissions of user directory to 711:-
# chmod 711 /home/username

– setting permissions of public_html to 755:-
# chmod 755 /home/username/public_html

– stopping apache:-
# /etc/rc.d/init.d/httpd stop

– starting apache:-
# /etc/rc.d/init.d/httpd start

There are security implications for the above, but I won’t go into it here