<div dir="ltr"><div>Hey guys back at it. I expect that Linux issues are really a much bigger problem for me than squid!</div><div><br></div><div>I'm running into this problem now:</div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div>/var/run/squid3.pid: (13) Permission denied</div></blockquote><div><br></div><div>I know it's a permission problem, but not sure the optimal way of fixing it.</div><div><br></div><div>I created user 'proxy' and group 'squid' to run squid:</div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div>sudo addgroup --system squid</div><div>sudo adduser --system --no-create-home --group proxy squid</div></blockquote><div><br></div><div>And I set up my build config accordingly:</div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div>--with-default-user=proxy</div></blockquote><div><br></div><div>but 'proxy' does not have access to /var/run:</div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div>lrwxrwxrwx 1 root root /var/run</div></blockquote><div><br></div><div>This explains why /var/run/squid3.pid cannot be written, but I'm not sure simply changing ownership of /var/run to 'proxy' is the best approach given that squid is not the only service that accesses that folder. I'm thinking that I should configure the build differently.</div><div><br></div><div>In order to see what configurations are used in the distro package, I installed it:</div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div>sudo apt-get install squid</div></blockquote><div><br></div><div>and had a look at the output of:</div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div>squid3 -v </div></blockquote><div><br></div><div>These setting are troubling for me:</div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div>--prefix=/usr</div><div>--localstatedir=/var</div><div>--with-swapdir=/var/spool/squid3</div><div>--with-logdir=/var/log/squid3</div><div>--with-pidfile=/var/run/squid3.pid</div><div>--datadir=/usr/share/squid3</div><div>--mandir=/usr/share/man' </div><div>--sysconfdir=/etc</div><div>--sysconfdir=/etc/squid3</div></blockquote><div><br></div><div>Yes --sysconfdir is defined twice! Regardless of that, wouldn't it better to set them up this way:</div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div>--prefix=/usr</div><div>--localstatedir=${prefix}/var</div><div>--with-swapdir=${localstatedir}/spool/squid3 </div><div>--with-logdir=${localstatedir}/log/squid3</div><div>--with-pidfile=${localstatedir}/run/squid3.pid</div><div>--datadir=${prefix}/share/squid3</div><div>--mandir=${prefix}/share/man' </div><div>--sysconfdir=${prefix}/etc/squid3</div></blockquote><div><br></div><div>I'm not positive about this directive:</div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div>--sysconfdir=${prefix}/etc/squid3</div></blockquote><div><br></div><div>that may be better left as:</div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div>--sysconfdir=/etc/squid3</div></blockquote><div><br></div><div>I am curious about the others though. If what I've said makes sense, I'll update my build config that way and make one more change:</div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div>--prefix=/proxy</div></blockquote><div><br></div><div>Thanks</div><div>Deiter</div><div><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Sep 7, 2015 at 6:44 PM, Amos Jeffries <span dir="ltr"><<a href="mailto:squid3@treenet.co.nz" target="_blank">squid3@treenet.co.nz</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span class="">On 8/09/2015 10:10 a.m., Eliezer Croitoru wrote:<br>
> Hey Howard,<br>
><br>
> I forgot to mention that squid uses the directory "/var/run/squid" as<br>
> the IPC directory which should be owned by the proxy or squid<br>
> user(depends on the OS).<br>
> From what you have mentioned squid tries to access some directory and is<br>
> getting denied by permissions.<br>
> Please Don't run squid with a "-n" option if possible, it will limit<br>
> your options to using only one worker(which is the default and is OK in<br>
> most basic cases).<br>
<br>
</span>No. The -N (upper case) means that. On Ubuntu the -N was needed for<br>
Upstart integration (now defunct in the custom build).<br>
<br>
Not to be confused with -n (lower case) which means a multi-tenant /<br>
multi-instance named service is being used.<br>
<span class=""><font color="#888888"><br>
Amos<br>
</font></span><div class=""><div class="h5"><br>
_______________________________________________<br>
squid-users mailing list<br>
<a href="mailto:squid-users@lists.squid-cache.org">squid-users@lists.squid-cache.org</a><br>
<a href="http://lists.squid-cache.org/listinfo/squid-users" rel="noreferrer" target="_blank">http://lists.squid-cache.org/listinfo/squid-users</a><br>
</div></div></blockquote></div><br></div></div>