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