Opened 5 years ago

Closed 3 years ago

#958 closed defect (wontfix)

nginx-1.10.0 breaks init script status command for unprivileged user

Reported by: sprtrox@… Owned by:
Priority: minor Milestone: 1.11
Component: nginx-package Version: 1.9.x
Keywords: Cc:
uname -a: Linux prod-admin.xxxxxx 2.6.32-504.3.3.el6.x86_64 #1 SMP Wed Dec 17 01:55:02 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
nginx -V: nginx version: nginx/1.10.0
built by gcc 4.4.7 20120313 (Red Hat 4.4.7-16) (GCC)
built with OpenSSL 1.0.1e-fips 11 Feb 2013
TLS SNI support enabled
configure arguments: --prefix=/etc/nginx --sbin-path=/usr/sbin/nginx --modules-path=/usr/lib64/nginx/modules --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --pid-path=
/var/run/nginx.pid --lock-path=/var/run/nginx.lock --http-client-body-temp-path=/var/cache/nginx/client_temp --http-proxy-temp-path=/var/cache/nginx/proxy_temp --http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp --http-uwsgi-temp-path=
/var/cache/nginx/uwsgi_temp --http-scgi-temp-path=/var/cache/nginx/scgi_temp --user=nginx --group=nginx --with-http_ssl_module --with-http_realip_module --with-http_addition_module --with-http_sub_module --with-http_dav_module --with-http
_flv_module --with-http_mp4_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_random_index_module --with-http_secure_link_module --with-http_stub_status_module --with-http_auth_request_module --with-http_xslt_mod
ule=dynamic --with-http_image_filter_module=dynamic --with-http_geoip_module=dynamic --with-http_perl_module=dynamic --add-dynamic-module=njs-1c50334fbea6/nginx --with-threads --with-stream --with-stream_ssl_module --with-http_slice_modul
e --with-mail --with-mail_ssl_module --with-file-aio --with-ipv6 --with-http_v2_module --with-cc-opt='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic'

Description

RPM update earlier today broke our nagios reporting...

[root@prod-admin nginx]# service nginx restart
Stopping nginx: [ OK ]
Starting nginx: [ OK ]

[root@prod-admin nginx]# rpm -qa | grep nginx
nginx-1.10.0-1.el6.ngx.x86_64

[root@prod-admin nginx]# su -c "service nginx status" nagios
nginx dead but pid file exists

[root@prod-admin nginx]# su -c "service nginx status" root
nginx (pid 17177) is running...

Change History (3)

comment:1 by Maxim Dounin, 5 years ago

Component: documentationnginx-package

comment:2 by sprtrox@…, 5 years ago

Bug is still present in package nginx-1.10.1-1.el6.ngx.x86_64

comment:3 by thresh, 3 years ago

Resolution: wontfix
Status: newclosed

This happens because we're using binary name (nginx or nginx-debug to distinguish between pids/programs) in status call for "service nginx status". On RHEL6/CentOS6 this means that service helpers will use /proc/$pid/exe to compare against supplied binary name, and that requires root.

Unfortunately that is not something we will fix. For your specific use-case I guess just checking manually if the pid provided in /var/run/nginx.pid is still running would be sufficient.

Note: See TracTickets for help on using tickets.