FreeBSD Clean Install nginx.pid Permissions Errors

lists at lazygranch.com lists at lazygranch.com
Fri Jul 14 01:31:51 UTC 2017


On Thu, 13 Jul 2017 23:46:12 +0100
Francis Daly <francis at daoine.org> wrote:

> On Thu, Jul 13, 2017 at 09:37:08AM -0400, Viaduct Lists wrote:
> 
> Hi there,
> 
> > [Wed Jul 12 06:08:41 rich at neb /var/log/nginx] nginx -t  
> 
> If you were running this command as "root", would that prompt say
> "root at neb" and end with a # ?
> 
> > nginx: the configuration file /usr/local/etc/nginx/nginx.conf
> > syntax is ok nginx: [emerg] open() "/var/run/nginx.pid" failed (13:
> > Permission denied)  
> 
> That might relate to permissions on /, /var, or /var/run, instead of
> on /var/run/nginx.pid.
> 
> But still: from what you've shown, there is no indication that user
> "rich" has the necessary permissions.
> 
> Good luck with it,
> 
> 
From FreeBSD 11.0
	f
/var
drwxr-xr-x  28 root  wheel      512 Jul 12 08:00 var

/var/run
drwxr-xr-x  10 root     wheel     1024 Jul 13 03:01 run

/usr/local/www
drwxr-xr-x   5 root  wheel   512 Jun 18 04:13 www

Contents of /usr/local/www
drwxr-xr-x  3 root  wheel  512 Jun 10 00:19 .well-known
drwxr-xr-x  2 root  www    512 Jun 12 01:16 acme
lrwxr-xr-x  1 root  wheel   25 Jun 18 04:13 nginx
-> /usr/local/www/nginx-dist dr-xr-xr-x  5 root  wheel  512 Jun 18
04:13 nginx-dist

Contents of /usr/local/www/nginx-dist/
-rw-r--r--  1 root  wheel  537 Jun 18 04:12 50x.html
-rw-r--r--  1 root  wheel    1 Jun 18 04:12
EXAMPLE_DIRECTORY-DONT_ADD_OR_TOUCH_ANYTHING -rw-r--r--  1 root  wheel
612 Jun 18 04:12 index.html drwxr-xr-x  2 root  wheel  512 Jun  9 07:00
<mydomain.com>

However the nginx process is owned by www:
 823 www           1  20    0 28552K  7060K kqread   0:01   0.00% nginx





/var/run/ngin.pid
-rw-r--r--  1 root      wheel       4 Jul 12 08:00 nginx.pid


More information about the nginx mailing list