id,summary,reporter,owner,description,type,status,priority,milestone,component,version,resolution,keywords,cc,uname,nginx_version 1740,ngins -s reopen / SIGUSR1 and permissions problem,seem8@…,,"Since this is my first bug report, hello everyone. I have a minor problem with SIGUSR1 and it's totally on my side, but I think it's pretty common configuration. I changed permissions to nginx logs, so www-data (default Ubuntu user for Nginx) will not able to read, nor write them, not even change directory to them. This creates a problem in with logrotate, because Nginx stops logging every midnight. According to this http://nginx.org/en/docs/control.html , Nginx master process re-opens web.page-access/errors.log, gracefully restart workers and then tell them to use a new one. It creates log files with www-data read/write permissions, which I try to avoid, but even then the workers are not able to reach them. From the /var/log/nginx/error.log: 2019/03/07 09:01:07 [emerg] 25817#25817: open() ""/dir/with/logs/web.site-access.log"" failed (13: Permission denied) It's the same problem with logrotate and manual restarts: # nginx -s reopen # kill -USR1 `cat /var/run/nginx.pid` From what I found here - http://mailman.nginx.org/pipermail/nginx/2011-January/024444.html - functions responsible for that are in /src/os/unix/ngx_process_cycle.c file. My only solution is to change ""kill -USR1 `cat /var/run/nginx.pid`"" to ""systemctl reload nginx"", because then it's logging fine, but there is a risk of misconfiguration that will prevent Nginx from reloading. Thanks in advance. Lukasz",enhancement,closed,minor,,nginx-core,1.14.x,invalid,,,Linux [hostname] 4.15.0-45-generic #48-Ubuntu SMP Tue Jan 29 16:28:13 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux,"nginx -V nginx version: nginx/1.14.0 (Ubuntu) built with OpenSSL 1.1.0g 2 Nov 2017 TLS SNI support enabled configure arguments: --with-cc-opt='-g -O2 -fdebug-prefix-map=/build/nginx-FIJPpj/nginx-1.14.0=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -Wdate-time -D_FORTIFY_SOURCE=2' --with-ld-opt='-Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now -fPIC' --prefix=/usr/share/nginx --conf-path=/etc/nginx/nginx.conf --http-log-path=/var/log/nginx/access.log --error-log-path=/var/log/nginx/error.log --lock-path=/var/lock/nginx.lock --pid-path=/run/nginx.pid --modules-path=/usr/lib/nginx/modules --http-client-body-temp-path=/var/lib/nginx/body --http-fastcgi-temp-path=/var/lib/nginx/fastcgi --http-proxy-temp-path=/var/lib/nginx/proxy --http-scgi-temp-path=/var/lib/nginx/scgi --http-uwsgi-temp-path=/var/lib/nginx/uwsgi --with-debug --with-pcre-jit --with-http_ssl_module --with-http_stub_status_module --with-http_realip_module --with-http_auth_request_module --with-http_v2_module --with-http_dav_module --with-http_slice_module --with-threads --with-http_addition_module --with-http_geoip_module=dynamic --with-http_gunzip_module --with-http_gzip_static_module --with-http_image_filter_module=dynamic --with-http_sub_module --with-http_xslt_module=dynamic --with-stream=dynamic --with-stream_ssl_module --with-mail=dynamic --with-mail_ssl_module "