Hello,
I noticed the following behavior.
- stop nginx (/etc/init.d/nginx stop on a debian box)
- remove all logs in /var/log/nginx/
- start nginx
now /var/log/nginx/access.log and /var/log/nginx/error.log are owned by
root:root.
in fact it’s the same for all other vhosts log files.
- issue kill -USR1
cat /var/run/nginx.pid
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?
Gregory