Re: FreeBSD Clean Install nginx.pid Permissions Errors

2017-07-15 Thread nanaya
Hi, On Sun, Jul 16, 2017, at 00:45, Viaduct Lists wrote: > > My point was that you can start the service as root, or set the user to > root in nginx.conf. It’s confusing. Two ways. If I’m deliberately > starting the service as root, why would I need to set the config file to > indicate so? >

Re: FreeBSD Clean Install nginx.pid Permissions Errors

2017-07-15 Thread Viaduct Lists
> On Jul 15, 2017, at 6:24 AM, nanaya wrote: > >> 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

Re: FreeBSD Clean Install nginx.pid Permissions Errors

2017-07-15 Thread nanaya
On Sat, Jul 15, 2017, at 18:56, Viaduct Lists wrote: > > > On Jul 15, 2017, at 5:04 AM, nanaya 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 woul

Re: FreeBSD Clean Install nginx.pid Permissions Errors

2017-07-15 Thread Viaduct Lists
> On Jul 15, 2017, at 5:04 AM, nanaya 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

Re: FreeBSD Clean Install nginx.pid Permissions Errors

2017-07-15 Thread nanaya
Hi, On Sat, Jul 15, 2017, at 17:47, Viaduct Lists wrote: > The latter. It makes little sense. If it’s ignored then there’s no > sense in having it. > It works if you start it from user with root privilege. Otherwise you can't switch user and thus the directive is ignored. > Much like how th

Re: FreeBSD Clean Install nginx.pid Permissions Errors

2017-07-15 Thread Viaduct Lists
The latter. It makes little sense. If it’s ignored then there’s no sense in having it. Much like how the current `nginx -t` report makes little sense as well: nginx: the configuration file /usr/local/etc/nginx/nginx.conf syntax is ok nginx: [emerg] open() "/var/run/nginx.pid" failed (13: Per

Re: FreeBSD Clean Install nginx.pid Permissions Errors

2017-07-14 Thread Francis Daly
On Fri, Jul 14, 2017 at 10:40:27AM -0400, Viaduct Lists wrote: > > On Jul 14, 2017, at 9:29 AM, Francis Daly wrote: Hi there, > > In unix land, usually, if a process starts running as root, then it is > > able to "switch" to run as another user. If a process starts running as > > non-root, it is

Re: FreeBSD Clean Install nginx.pid Permissions Errors

2017-07-14 Thread lists
'd suggest setting up a jail. But only after nginx itself is hardened.    Original Message   From: Alberto Castillo Sent: Friday, July 14, 2017 9:48 AM To: nginx@nginx.org Reply To: nginx@nginx.org Subject: Re: FreeBSD Clean Install nginx.pid Permissions Errors On 07/14, li...@lazygranch.com w

Re: FreeBSD Clean Install nginx.pid Permissions Errors

2017-07-14 Thread Viaduct Lists
OK, good to know. Thank you. This does suggest that security isn’t really respected in this case. Cheers > On Jul 14, 2017, at 11:04 AM, Alberto Castillo wrote: > > I've just set up mine on a FreeBSD box and using sudo solves the > problem, same issue with .pid. _ Rich in T

Re: FreeBSD Clean Install nginx.pid Permissions Errors

2017-07-14 Thread Alberto Castillo
o: nginx@nginx.org > Reply To: nginx@nginx.org > Subject: Re: FreeBSD Clean Install nginx.pid Permissions Errors > > I've just set up mine on a FreeBSD box and using sudo solves the > problem, same issue with .pid. > Yes, I use it as a service but since the thread seems to

Re: FreeBSD Clean Install nginx.pid Permissions Errors

2017-07-14 Thread lists
I guess I'm missing something here since nginx should be invoke by "service" such as "service nginx restart".   Original Message   From: Alberto Castillo Sent: Friday, July 14, 2017 8:05 AM To: nginx@nginx.org Reply To: nginx@nginx.org Subject: Re: FreeBSD Clean Inst

Re: FreeBSD Clean Install nginx.pid Permissions Errors

2017-07-14 Thread Alberto Castillo
On 07/14, Jim Ohlstein wrote: > Hello, > > On 07/14/2017 10:39 AM, Viaduct Lists wrote: > > > >> On Jul 13, 2017, at 9:31 PM, li...@lazygranch.com wrote: > >> > >> However the nginx process is owned by www: > >> 823 www 1 200 28552K 7060K kqread 0:01 0.00% nginx > > > > Sure

Re: FreeBSD Clean Install nginx.pid Permissions Errors

2017-07-14 Thread Jim Ohlstein
Hello, On 07/14/2017 10:39 AM, Viaduct Lists wrote: > >> On Jul 13, 2017, at 9:31 PM, li...@lazygranch.com wrote: >> >> However the nginx process is owned by www: >> 823 www 1 200 28552K 7060K kqread 0:01 0.00% nginx > > Sure the process is owned, and is called upon by nginx

Re: FreeBSD Clean Install nginx.pid Permissions Errors

2017-07-14 Thread Viaduct Lists
Hi there. > On Jul 14, 2017, at 9:29 AM, Francis Daly wrote: > > In unix land, usually, if a process starts running as root, then it is > able to "switch" to run as another user. If a process starts running as > non-root, it is not able to switch to run as another user. > > And (usually) only r

Re: FreeBSD Clean Install nginx.pid Permissions Errors

2017-07-14 Thread Viaduct Lists
> On Jul 13, 2017, at 9:31 PM, li...@lazygranch.com wrote: > > However the nginx process is owned by www: > 823 www 1 200 28552K 7060K kqread 0:01 0.00% nginx Sure the process is owned, and is called upon by nginx as the www user. The `nginx -t` report is being called by ri

Re: FreeBSD Clean Install nginx.pid Permissions Errors

2017-07-14 Thread Francis Daly
On Thu, Jul 13, 2017 at 06:58:02PM -0400, Viaduct Lists wrote: Hi there, > But sudo nginx -t gets rid of the error on nginx.pid > > That whole user/group issue on the user directive in nginx.conf is confusing > as it ignores any attempt at using user root;. In unix land, usually, if a proces

Re: FreeBSD Clean Install nginx.pid Permissions Errors

2017-07-13 Thread li...@lazygranch.com
On Thu, 13 Jul 2017 23:46:12 +0100 Francis Daly wrote: > On Thu, Jul 13, 2017 at 09:37:08AM -0400, Viaduct Lists wrote: > > Hi there, > > > [Wed Jul 12 06:08:41 rich@neb /var/log/nginx] nginx -t > > If you were running this command as "root", would that prompt say > "root@neb" and end with a

Re: FreeBSD Clean Install nginx.pid Permissions Errors

2017-07-13 Thread Viaduct Lists
Hi there. Thanks for the reply. Persistent permissions issues are on other boxes, on OSX as well. But I had some Passenger issues so I’ve moved into another issue. But sudo nginx -t gets rid of the error on nginx.pid That whole user/group issue on the user directive in nginx.conf is confusing

Re: FreeBSD Clean Install nginx.pid Permissions Errors

2017-07-13 Thread Francis Daly
On Thu, Jul 13, 2017 at 09:37:08AM -0400, Viaduct Lists wrote: Hi there, > [Wed Jul 12 06:08:41 rich@neb /var/log/nginx] nginx -t If you were running this command as "root", would that prompt say "root@neb" and end with a # ? > nginx: the configuration file /usr/local/etc/nginx/nginx.conf synta

FreeBSD Clean Install nginx.pid Permissions Errors

2017-07-13 Thread Viaduct Lists
Hi folks. Trying to get this FreeBSD nginx installation set up. FreeBSD 11.1-RC1 nginx version: nginx/1.12.0 3 vhosts on this box. nginx.conf tests show the following: [Wed Jul 12 06:08:41 rich@neb /var/log/nginx] nginx -t nginx: the configuration file /usr/local/etc/nginx/nginx.conf syntax