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

Tue Apr 12 13:56:22 UTC 2011
Johnny Hughes <johnny at centos.org>

On 04/11/2011 04:50 PM, Todd Cary wrote:
> For a long period of time, my Apache root directory has been 
> /home/httpd.  For security reasons, this is not so good as 
> SELinux has informed me.  Now all of the files have been copied 
> to /var/www/etc with owner and group "root".  The privileges are 
> 754 (rwxr-xr--), however apache does not have access to them.  
> Should the owner be apache?  Group?
> 
> Todd
> 

You will need give the user who is running the httpd daemon (apache by
default) the required access to the files.

If you have things that need to be written, you will need to give that
user (again, apache by default)  write access to those files/directories.

You control who an httpd instance runs as in the httpd.conf file ...
look for User and Group in your httpd.conf file.  This will tell you for
the default install:

egrep '^User|^Group' /etc/httpd/conf/httpd.conf

You will need to set user and/or group permissions on your directory as
required based on who is running the httpd daemon.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 253 bytes
Desc: OpenPGP digital signature
URL: <http://lists.centos.org/pipermail/centos/attachments/20110412/d58e5e8e/attachment-0005.sig>