Nginx does not re-open log files on SIGUSR1.

Piotr Sikora piotr.sikora at
Mon Jan 3 17:25:42 MSK 2011


> Any reason to?

Yes, user requires "+x" permission to the directory in order to be able to 
open any file(s) inside it. Google/Bing/whatever for "unix permissions", 
this is as simple as it gets.

> Nginx works for me flawless on each box with 700 root:root on 
> /var/log/nginx, the only problem I found is SIGUSR1, Whatever you agree 
> with me or not, nginx shoudn't need perms on its logs dir, because it will 
> allow users to use symlink to fetch logs.

This is because:
- on start and reload - master process opens log files before fork() and 
worker processes only inherit them,
- on reopen - all processes need to open logs, so workers also need 
permission to open log files.

Best regards,
Piotr Sikora < piotr.sikora at >

More information about the nginx mailing list