[Slackbuilds-users] nginx permissions?

Miguel De Anda miguel at thedeanda.com
Mon Feb 15 22:15:48 UTC 2016

i actually [finally] figured out the problem. i only revisit this
problem each time i setup a new system and run into the same issue and
i think i solve it a different way each time. anyway, the solution to
this issue is that the permissions to the /var/lib/nginx folder are
700 and should be 755. can we try to fix that? i feel like i've had to
re-solve this a few times now. :-P

On Tue, May 5, 2015 at 10:01 PM, Miguel De Anda <miguel at thedeanda.com> wrote:
> i've installed nginx from the slackbuild and i have it run as a proxy for
> tomcat with a config something like this...
> sever {
>   server_name example.com;
>   location / {
>     proxy_pass http://localhost:8080;
>     proxy_set_header X-Real-IP $remote_addr;
>     proxy_set_header X-Forwarded-For $remote_addr;
>     proxy_set_header Host $host;
>   }
> }
> when it tries to load some files, it fails with the following error:
> 2015/05/05 14:59:31 [crit] 25274#0: *5 open()
> "/var/lib/nginx/proxy/3/00/0000000003" failed (13: Permission denied) while
> reading upstream, client:, server: example.com, request: "GET
> /foo-file.css HTTP/1.1", upstream: "",
> host: "example.com", referrer: "http://example.com/index.html"
> it seems to kind of work if i add a
> user mdeanda users;
> to the config and change the permission to /var/lib/nginx/* to my local user
> (and create lots of folders in the proxy directory) but that's obviously not
> the correct way. has anybody dealt with this? i know ubuntu and others tend
> to run nginx as a www-data user, is that what we need for nginx? a new user?
> -m

More information about the SlackBuilds-users mailing list