You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by "Ronaldy, Franky" <fr...@hp.com> on 2005/03/11 03:11:22 UTC

[users@httpd] Change owner for apache log files

Hi All,

Does anyone know how to change the owner for apache log files
(access_log, agent_log, etc..)? My log files always owned by root
account. Does the owner of log files depends on who execute apachectl
command or I can define somewhere? Thanks.

Rgds,
Franky

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Change owner for apache log files

Posted by dan <in...@hostinthebox.net>.
Ronaldy, Franky wrote:
> Hi All,
> 
> Does anyone know how to change the owner for apache log files
> (access_log, agent_log, etc..)? My log files always owned by root
> account. Does the owner of log files depends on who execute apachectl
> command or I can define somewhere? Thanks.
> 
> Rgds,
> Franky
> 

Franky -

The files should be owned by whatever user Apache relinquishes it's 
privileges to, specified by httpd.conf's 'User' and 'Group' directives.

Did you not specify these, or did you specify them as root?

Thanks
-dant

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Change owner for apache log files

Posted by Joshua Slive <js...@gmail.com>.
On Fri, 11 Mar 2005 10:11:22 +0800, Ronaldy, Franky
<fr...@hp.com> wrote:
> Hi All,
> 
> Does anyone know how to change the owner for apache log files
> (access_log, agent_log, etc..)? My log files always owned by root
> account. Does the owner of log files depends on who execute apachectl
> command or I can define somewhere? Thanks.

No, this can't be done, and you should be very careful fooling around
with this.  The log files will indeed be owned by the user who starts
apache (usually root).  You can use a piped-log process or a log
rotation script to change ownership, but be sure never to have root
writing to a location controlled by another user, since this can lead
to major security holes.

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org