Welcome! Log In Create A New Profile

Advanced

access_log and error_log ownership

March 11, 2012 12:20PM
Hello,

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
root:root.

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

4) 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
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

access_log and error_log ownership

gpakosz March 11, 2012 12:20PM

Re: access_log and error_log ownership

Maxim Dounin March 11, 2012 01:04PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 157
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 466 on July 09, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready