Re: Best configuration for /var/www/html/

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]





On 4/12/2011 6:56 AM, Johnny Hughes wrote:
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.

_______________________________________________ CentOS mailing list CentOS@xxxxxxxxxx http://lists.centos.org/mailman/listinfo/centos
Thank you!  Yes, httpd.conf does have the correct parameters:

#
User apache
Group apache

Since I am a "Sunday user" of Linux in that once I set it up, it may be months before I need to do anything other than backup and run yum update.  As a result, my Linux skills are not like someone using Linux daily (wish I did not have to earn my living in the Windows world).  So, I wanted to make sure that changing the Owner and Group to "apache" for /var/www/ was correct.

Todd
-- 
Ariste Software
Petaluma, CA 94952

http://www.aristesoftware.com
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux