[CentOS] Best configuration for /var/www/html/

Mon Apr 11 22:00:03 UTC 2011
Les Bell <lesbell at lesbell.com.au>

Todd Cary <todd at aristesoftware.com> wrote:

The privileges are
754 (rwxr-xr--), however apache does not have access to them.
Should the owner be apache?  Group?

It's probably the SELinux labels preventing access - I stumbled across this
yesterday while setting up a local mirror to deploy 5.6.

Do an ls -lZ on the stuff in /var/www/html - it should look something like

drwxr-xr-x  root root system_u:object_r:httpd_sys_content_t CentOS

You've probably got the wrong user and type on your files. Use chcon to
change them - from memory

chcon -R -u system_u -t httpd_sys_content_t

I hope that gets it for you.


--- Les Bell
Tel: +61 2 9451 1144