Welcome! Log In Create A New Profile

Advanced

Re: FreeBSD Clean Install nginx.pid Permissions Errors

nanaya
July 15, 2017 06:26AM
On Sat, Jul 15, 2017, at 18:56, Viaduct Lists wrote:
>
> > On Jul 15, 2017, at 5:04 AM, nanaya <me@nanaya.pro> wrote:
> >
> >
> > It works if you start it from user with root privilege. Otherwise you
> > can't switch user and thus the directive is ignored.
>
> If I deliberately start up using root, why would I need a directive that
> indicates that? This directive seems like a reminder after the fact.
>

root is usually needed to bind port 80 and 443 so usually people want to
start it using root. But apart of the binding, having everything running
as root is dangerous especially for something that's public facing so
usually root is only used for stuff which requires it and then the
worker processes, the processes which actually handle requests, are run
as different user. The `user` directive is used to tell which user the
processes should be run as.

The directive defaults to `user nobody nobody` so `user root` means you
explicitly want the workers to run as root instead of nobody (assuming
it works).

>
> In my case, all servers reporting this are working and serving as
> expected. So the failure and permissions errors are pretty much useless
> reporting.
>

While it runs, without working pid file, you'll need alternative way of
maintaining the process (upgrade, config reload, log rotate, shutdown,
etc). Especially `-s` switch of `nginx` can't be used to control running
process because it doesn't have valid pidfile.
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

FreeBSD Clean Install nginx.pid Permissions Errors

Viaduct Lists July 13, 2017 09:38AM

Re: FreeBSD Clean Install nginx.pid Permissions Errors

Francis Daly July 13, 2017 06:48PM

Re: FreeBSD Clean Install nginx.pid Permissions Errors

Viaduct Lists July 13, 2017 07:00PM

Re: FreeBSD Clean Install nginx.pid Permissions Errors

Francis Daly July 14, 2017 09:30AM

Re: FreeBSD Clean Install nginx.pid Permissions Errors

Viaduct Lists July 14, 2017 10:42AM

Re: FreeBSD Clean Install nginx.pid Permissions Errors

Francis Daly July 14, 2017 11:00PM

Re: FreeBSD Clean Install nginx.pid Permissions Errors

Viaduct Lists July 15, 2017 04:48AM

Re: FreeBSD Clean Install nginx.pid Permissions Errors

nanaya July 15, 2017 05:06AM

Re: FreeBSD Clean Install nginx.pid Permissions Errors

Viaduct Lists July 15, 2017 05:58AM

Re: FreeBSD Clean Install nginx.pid Permissions Errors

nanaya July 15, 2017 06:26AM

Re: FreeBSD Clean Install nginx.pid Permissions Errors

Viaduct Lists July 15, 2017 11:46AM

Re: FreeBSD Clean Install nginx.pid Permissions Errors

nanaya July 15, 2017 12:10PM

Re: FreeBSD Clean Install nginx.pid Permissions Errors

gariac July 13, 2017 09:32PM

Re: FreeBSD Clean Install nginx.pid Permissions Errors

Viaduct Lists July 14, 2017 10:40AM

Re: FreeBSD Clean Install nginx.pid Permissions Errors

Jim Ohlstein July 14, 2017 11:00AM

Re: FreeBSD Clean Install nginx.pid Permissions Errors

Alberto Castillo July 14, 2017 11:06AM

Re: FreeBSD Clean Install nginx.pid Permissions Errors

gariac July 14, 2017 11:52AM

Re: FreeBSD Clean Install nginx.pid Permissions Errors

Alberto Castillo July 14, 2017 12:50PM

Re: FreeBSD Clean Install nginx.pid Permissions Errors

gariac July 14, 2017 04:24PM

Re: FreeBSD Clean Install nginx.pid Permissions Errors

Viaduct Lists July 14, 2017 01:34PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 306
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready