assign user and group to site log files

Posted by Francis on Server Fault See other posts from Server Fault or by Francis
Published on 2012-07-06T19:06:24Z Indexed on 2012/07/07 9:18 UTC
Read the original article Hit count: 175

Filed under:
|

When in a site apache conf file, is there a way to set the user and group for the CustomLog and ErrorLog? Right now, these 2 records create the error and access log with root:root permissions, but I would like them to be flewis:admin

CustomLog /var/log/httpd/domain.com-access.log combined
ErrorLog /var/log/httpd/domain.com-error.log

If I change the user:group of the files, when the logs rotate, the new logs are root:root

© Server Fault or respective owner

Related posts about apache2

Related posts about error-logging