Weird privilege errors on Ubuntu 20.04

hgv nginx-forum at forum.nginx.org
Wed Jun 9 18:55:57 UTC 2021


/lib/systemd/system/nginx-debug.service and
/lib/systemd/system/nginx.service exist (different path then what you
previously asked, sorry for the misunderstanding)

/lib/systemd/system/nginx-debug.service

[Unit]
Description=nginx - high performance web server
Documentation=https://nginx.org/en/docs/
After=network-online.target remote-fs.target nss-lookup.target
Wants=network-online.target

[Service]
Type=forking
PIDFile=/var/run/nginx.pid
ExecStart=/usr/sbin/nginx-debug -c /etc/nginx/nginx.conf
ExecReload=/bin/sh -c "/bin/kill -s HUP $(/bin/cat /var/run/nginx.pid)"
ExecStop=/bin/sh -c "/bin/kill -s TERM $(/bin/cat /var/run/nginx.pid)"

[Install]
WantedBy=multi-user.target


/lib/systemd/system/nginx.service

[Unit]
Description=nginx - high performance web server
Documentation=https://nginx.org/en/docs/
After=network-online.target remote-fs.target nss-lookup.target
Wants=network-online.target

[Service]
Type=forking
PIDFile=/var/run/nginx.pid
ExecStart=/usr/sbin/nginx -c /etc/nginx/nginx.conf
ExecReload=/bin/sh -c "/bin/kill -s HUP $(/bin/cat /var/run/nginx.pid)"
ExecStop=/bin/sh -c "/bin/kill -s TERM $(/bin/cat /var/run/nginx.pid)"

[Install]
WantedBy=multi-user.target



Sergey A. Osokin Wrote:
-------------------------------------------------------
> On Wed, Jun 09, 2021 at 01:50:08PM -0400, hgv wrote:
> > In case it's relevant, I believe the initially installed version was
> 1.16 on
> > Ubuntu 18.04. Both have since been upgraded to current versions.
> 
> dpkg-deb(1) shows the following files in the package you've installed:
> 
> % dpkg-deb -c nginx_1.21.0-1\~focal_amd64.deb | grep system/nginx 
> -rw-r--r-- root/root       476 2021-05-25 09:01
> ./lib/systemd/system/nginx-debug.service
> -rw-r--r-- root/root       470 2021-05-25 09:01
> ./lib/systemd/system/nginx.service
> 
> Seems like missed files?
> 
> -- 
> Sergey Osokin
> 
> > hgv Wrote:
> > -------------------------------------------------------
> > > Nginx has been installed from the official Nginx repository.
> > > 
> > > /etc/apt/sources.list.d/nginx.list
> > > 
> > > deb [arch=amd64] http://nginx.org/packages/mainline/ubuntu/ focal
> > > nginx    
> > > 
> > > 
> > > Sergey A. Osokin Wrote:
> > > -------------------------------------------------------
> > > > On Wed, Jun 09, 2021 at 11:46:32AM -0400, hgv wrote:
> > > > > /etc/systemd/system/nginx.service.d/override.conf and
> > > > > /usr/lib/systemd/system/nginx.service don't exist
> > > > 
> > > > Thanks for the update.
> > > > 
> > > > Not sure how nginx package has been installed on that box. So,
> I'd
> > > > recommend
> > > > to follow the instruction and install nginx from a prebuilt
> Ubuntu
> > > > package:
> > > > 
> > > >
> > >
> https://docs.nginx.com/nginx/admin-guide/installing-nginx/installing-n
> > > 
> > > > ginx-open-source/#prebuilt_ubuntu
> > > > 
> > > > Thanks.
> > > > 
> > > > -- 
> > > > Sergey Osokin
> > > > _______________________________________________
> > > > nginx mailing list
> > > > nginx at nginx.org
> > > > http://mailman.nginx.org/mailman/listinfo/nginx
> > 
> > Posted at Nginx Forum:
> https://forum.nginx.org/read.php?2,291799,291815#msg-291815
> > 
> > _______________________________________________
> > nginx mailing list
> > nginx at nginx.org
> > http://mailman.nginx.org/mailman/listinfo/nginx
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx

Posted at Nginx Forum: https://forum.nginx.org/read.php?2,291799,291819#msg-291819



More information about the nginx mailing list