[Slackbuilds-users] nginx permissions?

Thomas Morper thomas at beingboiled.info
Mon Jul 13 00:13:06 UTC 2015


On Sun, 12 Jul 2015, Larry Hajali wrote:

> What does setting the permissions of /var/lib/nginx to 755 accomplish?

It will allow the worker processes to actually have access to the working 
directories :-)

The SlackBuild sets /var/lib/nginx to 0700. On startup the master process 
will create the various sub directories with the right ownership and 
permissions, but it won't change ownership or permissions of any existing 
directory including /var/lib/nginx itself, thus the worker processes can't 
access the working directories. Drop the "chmod 700 ..." from the build 
and everything should be fine.

Once up and running it should look like this:

  root at ks3357608:~# ll /var/lib/nginx/
  total 28
  drwxr-xr-x  7 root  root 4096 Apr 21 17:30 ./
  drwxr-xr-x 38 root  root 4096 Jul 12 23:59 ../
  drwx------  2 nginx root 4096 Jun 21 21:42 client-body/
  drwx------  2 nginx root 4096 Aug 31  2014 fastcgi/
  drwx------  2 nginx root 4096 Aug 31  2014 proxy/
  drwx------  2 nginx root 4096 Aug 31  2014 scgi/
  drwx------  2 nginx root 4096 Aug 31  2014 uwsgi/

> I could look at having a nginx user rather than it being optional.

I'm in favour of that.

-- 


More information about the SlackBuilds-users mailing list