<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Jul 8, 2015 at 1:31 PM, Miguel De Anda <span dir="ltr"><<a href="mailto:miguel@thedeanda.com" target="_blank">miguel@thedeanda.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I just had to rebuild my nginx machine and I ran into this issue<br>
again! I managed to fix it this time with a:<br>
<br>
chmod 755 /var/lib/nginx<br></blockquote><div>What does setting the permissions of /var/lib/nginx to 755 accomplish?  Nginx will create the folders by default when it starts up.  I assume your issue is that you had a previous instance of nginx running as a different user than user "nobody".<br><br></div><div>I could look at having a nginx user rather than it being optional.<br><br></div><div>--Larry<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
I notice the buildscript set it to 700. I simply installed it via<br>
slackrepo using nothing but defaults so nginx runs as user nobody.<br>
<br>
Might be worth checking out to prevent future issues.<br>
<div><div><br>
On Thu, May 7, 2015 at 11:53 AM, Thomas Morper <<a href="mailto:thomas@beingboiled.info" target="_blank">thomas@beingboiled.info</a>> wrote:<br>
> On Tue, 5 May 2015, Miguel De Anda wrote:<br>
><br>
>> i've installed nginx from the slackbuild and i have it run as a proxy for<br>
>> tomcat with a config something like this...<br>
><br>
>> when it tries to load some files, it fails with the following error:<br>
>> "/var/lib/nginx/proxy/3/00/0000000003" failed (13: Permission denied)<br>
><br>
>> it seems to kind of work if i add a<br>
>> user mdeanda users;<br>
>> to the config and change the permission to /var/lib/nginx/*<br>
><br>
> Nginx uses /var/lib/nginx for various temporary files, especially when<br>
> proxying. The directory should belong to root:root. Upon start, nginx will<br>
> then create the various subfolders and asign them to the $NGINXUSER unless<br>
> they already exist.<br>
><br>
> I ran into problems once when I either reconfigured or rebuilt nginx to<br>
> use a different user id but forgot about /var/lib/nginx/* still belonging<br>
> to the old user. I don't know how you ended up with the wrong permissions,<br>
> but if you stop nginx, remove the contents of /var/lib/nginx and restart<br>
> you should be fine. If the permission problems remain you should check<br>
> your config and your nginx package for possible errors (e.g. built in<br>
> wrong environment, manually specified user doesn't exist, etc.).<br>
><br>
> Regarding the user id... the SlackBuild script follows best practices by<br>
> using the defaults but still giving the user a choice. Having a dedicated<br>
> "nginx" user is IMHO desirable with regards to permissions and security.<br>
> It's not technically required, though.<br>
><br>
> --<br>
> _______________________________________________<br>
> SlackBuilds-users mailing list<br>
> <a href="mailto:SlackBuilds-users@slackbuilds.org" target="_blank">SlackBuilds-users@slackbuilds.org</a><br>
> <a href="http://lists.slackbuilds.org/mailman/listinfo/slackbuilds-users" rel="noreferrer" target="_blank">http://lists.slackbuilds.org/mailman/listinfo/slackbuilds-users</a><br>
> Archives - <a href="http://lists.slackbuilds.org/pipermail/slackbuilds-users/" rel="noreferrer" target="_blank">http://lists.slackbuilds.org/pipermail/slackbuilds-users/</a><br>
> FAQ - <a href="http://slackbuilds.org/faq/" rel="noreferrer" target="_blank">http://slackbuilds.org/faq/</a><br>
><br>
_______________________________________________<br>
SlackBuilds-users mailing list<br>
<a href="mailto:SlackBuilds-users@slackbuilds.org" target="_blank">SlackBuilds-users@slackbuilds.org</a><br>
<a href="http://lists.slackbuilds.org/mailman/listinfo/slackbuilds-users" rel="noreferrer" target="_blank">http://lists.slackbuilds.org/mailman/listinfo/slackbuilds-users</a><br>
Archives - <a href="http://lists.slackbuilds.org/pipermail/slackbuilds-users/" rel="noreferrer" target="_blank">http://lists.slackbuilds.org/pipermail/slackbuilds-users/</a><br>
FAQ - <a href="http://slackbuilds.org/faq/" rel="noreferrer" target="_blank">http://slackbuilds.org/faq/</a><br>
<br>
</div></div></blockquote></div><br></div></div>