Question about rotating log files with USR1 signal

Fabiano Furtado Pessoa Coelho fusca14 at gmail.com
Mon Jul 18 16:37:47 UTC 2022


Hi...

As described in the official documentation
http://nginx.org/en/docs/control.html#logs "The master process will
then re-open all currently open log files and assign them an
unprivileged user under which the worker processes are running, as an
owner.", the owner of the log file changes after the USR1 signal is
sent to NGINX master process.

Why does this behavior happen? Is there a way to keep the original
root owner of the log file?

The "systemctl reload nginx" is capable of creating a new log file
with the original root owner, but I think this isn't a clever
solution.

Thanks in advance.
Fabiano



More information about the nginx mailing list