access_log and error_log ownership

Grégory Pakosz gpakosz at
Sun Mar 11 16:18:39 UTC 2012


I noticed the following behavior.

1) stop nginx (/etc/init.d/nginx stop on a debian box)
2) remove all logs in /var/log/nginx/
3) start nginx

now /var/log/nginx/access.log and /var/log/nginx/error.log are owned by

in fact it's the same for all other vhosts log files.

4) issue kill -USR1 `cat /var/run/`

now /var/log/nginx/access.log and /var/log/nginx/error.log are owned by
www-data:root, where www-data is nginx's user as per /etc/nginx/nginx.conf
configuration file.

same for all vhosts log files.

Why is it so?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the nginx mailing list