<div dir="ltr"><span style="font-family:Arial;font-size:14.6666666666667px;white-space:pre-wrap;line-height:1.38">Rafael / Amos -</span><br><span style="font-family:Arial;font-size:14.6666666666667px;white-space:pre-wrap;line-height:1.38;background-color:transparent">I got my system up and running yesterday. Thanks so much for the help. I couldn't get some of the suggestions that Amos made to work, but they did after running some of the commands on Rafael's wiki, so a real team effort!</span><br><br><span style="font-size:14.6666666666667px;font-family:Arial;vertical-align:baseline;white-space:pre-wrap;background-color:transparent">After getting it up and running, I found that mac address filtering was </span><span style="font-size:14.6666666666667px;font-family:Arial;font-weight:700;font-style:italic;vertical-align:baseline;white-space:pre-wrap;background-color:transparent">not</span><span style="font-size:14.6666666666667px;font-family:Arial;vertical-align:baseline;white-space:pre-wrap;background-color:transparent"> working. On closer inspection I found that I was running v3.3.8. I guess that’s the version my new Ubuntu install (14.04.03 LTS) uses with: </span><br><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><span style="font-family:Arial;font-size:14.6666666666667px;font-style:italic;font-weight:700;white-space:pre-wrap;line-height:1.38;background-color:transparent">sudo apt-get install squid </span></blockquote><br><span style="font-family:Arial;font-size:14.6666666666667px;white-space:pre-wrap;line-height:1.38;background-color:transparent">I decided to try and build the latest version of squid from source and I ran into some more problems I cannot solve, so some follow up questions</span><div><span style="font-family:Arial;font-size:14.6666666666667px;line-height:1.38;white-space:pre-wrap;background-color:transparent"><br></span></div><div><span style="font-family:Arial;font-size:14.6666666666667px;line-height:1.38;white-space:pre-wrap;background-color:transparent">1) Earlier in the thread, Amos suggested I run:</span><br></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><span style="font-family:Arial;font-size:14.6666666666667px;font-weight:700;line-height:1.38;white-space:pre-wrap;background-color:transparent">apt-get build-dep squid</span></div></blockquote><div><span style="font-family:Arial;font-size:14.6666666666667px;line-height:1.38;white-space:pre-wrap;background-color:transparent"><br></span></div><div><span style="font-family:Arial;font-size:14.6666666666667px;line-height:1.38;white-space:pre-wrap;background-color:transparent">to install the packages needed to build squid. That’s just the dependencies though right; I still need the squid source code? Sorry if that seems obvious, just want to make sure I’m not missing something. </span><br><span style="font-size:14.6666669845581px;line-height:20.2399997711182px;font-family:Arial;white-space:pre-wrap;background-color:transparent"><br></span></div><div><span style="font-size:14.6666669845581px;line-height:20.2399997711182px;font-family:Arial;white-space:pre-wrap;background-color:transparent">2) I downloaded squid-3.5.8.tar.xz. I captured the configure options from my current v3.3.8 squid install using:</span></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><span style="font-family:Arial;font-size:14.6666666666667px;font-weight:700;line-height:1.38;white-space:pre-wrap;background-color:transparent">squid3 -v </span></div></blockquote><div><div><span style="font-family:Arial;font-size:14.6666666666667px;white-space:pre-wrap;line-height:1.38;background-color:transparent"><br></span></div><div><span style="font-family:Arial;font-size:14.6666666666667px;white-space:pre-wrap;line-height:1.38;background-color:transparent">but it led to errors when building v3.5.8, for example:</span><br></div></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><div><span style="font-family:Arial;font-size:14.6666666666667px;font-weight:700;white-space:pre-wrap;line-height:1.38;background-color:transparent">'--enable-auth-basic=DB,fake,getpwnam,LDAP,MSNT,MSNT-multi-domain,NCSA,NIS,PAM,POP3,RADIUS,SASL,SMB'. </span></div></div></blockquote><div><div><span style="font-family:Arial;font-size:14.6666666666667px;white-space:pre-wrap;line-height:1.38;background-color:transparent"><br></span></div><div><span style="font-family:Arial;font-size:14.6666666666667px;white-space:pre-wrap;line-height:1.38;background-color:transparent">I suppose it’s not surprising given it’s such an old version, so I went through them all and used the ones I thought made most sense for me. I got it to build. Here’s the squid3 -v output from my v3.5.8 build:</span><br></div></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><div><span style="font-family:Arial;font-size:14.6666666666667px;font-weight:700;white-space:pre-wrap;line-height:1.38;background-color:transparent">Squid Cache: Version 3.5.8</span></div></div><div><div><span style="font-family:Arial;font-size:14.6666666666667px;font-weight:700;white-space:pre-wrap;line-height:1.38;background-color:transparent">Service Name: squid</span></div></div><div><div><span style="font-family:Arial;font-size:14.6666666666667px;font-weight:700;white-space:pre-wrap;line-height:1.38;background-color:transparent">configure options: '--prefix=/mysquid' '--enable-arp-acl' '--localstatedir=/var' '--libexecdir=/lib/squid3' '--datadir=/share/squid3' '--sysconfdir=/etc/squid3' '--with-default-user=proxy' '--with-logdir=/var/log/squid3' '--with-pidfile=/var/run/squid3.pid' '--build=arm-linux-gnueabihf' '--includedir=/include' '--mandir=/share/man' '--infodir=/share/info' '--srcdir=.' '--enable-basic-auth-helpers=DB' 'build_alias=arm-linux-gnueabihf'</span></div></div></blockquote><span style="font-family:Arial;font-size:14.6666666666667px;line-height:1.38;white-space:pre-wrap;background-color:transparent"><div><span style="font-family:Arial;font-size:14.6666666666667px;line-height:1.38;white-space:pre-wrap;background-color:transparent"><br></span></div>Here are the problems:</span><br><div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div><span id="docs-internal-guid-ad1eb627-a907-f06b-3ba5-7d320887e4a9"><span style="font-family:Arial;font-size:14.6666666666667px;white-space:pre-wrap;background-color:transparent">a) I had to change the owner of /var/log/squid3 from root to proxy:</span></span></div></blockquote></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div><span id="docs-internal-guid-ad1eb627-a907-f06b-3ba5-7d320887e4a9"><span style="font-family:Arial;font-size:14.6666666666667px;font-weight:700;line-height:1.38;white-space:pre-wrap;background-color:transparent">sudo chown proxy /var/log/squid3 </span></span></div></blockquote></div></blockquote><div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div><span id="docs-internal-guid-ad1eb627-a907-f06b-3ba5-7d320887e4a9"><font face="Arial"><span style="font-size:14.6666669845581px;line-height:20.2399997711182px;white-space:pre-wrap"><br></span></font></span></div><div><span id="docs-internal-guid-ad1eb627-a907-f06b-3ba5-7d320887e4a9"><span style="font-family:Arial;font-size:14.6666666666667px;line-height:1.38;white-space:pre-wrap;background-color:transparent">Not a big deal I guess, but why can’t make install take care of the permissions?</span></span></div><div><span id="docs-internal-guid-ad1eb627-a907-f06b-3ba5-7d320887e4a9"><font face="Arial"><br></font></span></div><div><span style="font-family:Arial;font-size:14.6666666666667px;white-space:pre-wrap;background-color:transparent">b) It doesn’t start as a service and there’s no squid file in:</span><br></div></blockquote></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div><span id="docs-internal-guid-ad1eb627-a907-f06b-3ba5-7d320887e4a9"><span style="font-family:Arial;font-size:14.6666666666667px;font-weight:700;line-height:1.38;white-space:pre-wrap;background-color:transparent">/etc/init.d/</span></span></div></blockquote></div></blockquote><div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div><span><span style="font-family:Arial;font-size:14.6666666666667px;line-height:1.38;white-space:pre-wrap;background-color:transparent"><br></span></span></div><div><span id="docs-internal-guid-ad1eb627-a907-f06b-3ba5-7d320887e4a9"><span style="font-family:Arial;font-size:14.6666666666667px;line-height:1.38;white-space:pre-wrap;background-color:transparent">so I cannot make the DAEMON= and CONFIG= variables point at my custom /mysquid/sbin/squid and /etc/squid3/squid.conf (I’ll change the --sysconfdir config parameter to /mysquid/etc/squid3 in a future build)</span></span></div><div><span id="docs-internal-guid-ad1eb627-a907-f06b-3ba5-7d320887e4a9"><font face="Arial"><span style="font-size:14.6666669845581px"><br></span></font></span></div><div><span id="docs-internal-guid-ad1eb627-a907-f06b-3ba5-7d320887e4a9"><span style="font-family:Arial;font-size:14.6666666666667px;white-space:pre-wrap;background-color:transparent">c) There’s no error when I run:</span></span></div></blockquote></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div><span id="docs-internal-guid-ad1eb627-a907-f06b-3ba5-7d320887e4a9"><span style="font-family:Arial;font-size:14.6666666666667px;font-weight:700;line-height:1.38;white-space:pre-wrap;background-color:transparent"> /mysquid/sbin/squid -k parse</span></span></div></blockquote></div></blockquote><div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div><span><span style="font-family:Arial;font-size:14.6666666666667px;line-height:1.38;white-space:pre-wrap;background-color:transparent"><br></span></span></div><div><span id="docs-internal-guid-ad1eb627-a907-f06b-3ba5-7d320887e4a9"><span style="font-family:Arial;font-size:14.6666666666667px;line-height:1.38;white-space:pre-wrap;background-color:transparent">but when I run:</span></span></div></blockquote></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div><span id="docs-internal-guid-ad1eb627-a907-f06b-3ba5-7d320887e4a9"><span style="font-family:Arial;font-size:14.6666666666667px;font-weight:700;line-height:1.38;white-space:pre-wrap;background-color:transparent">/mysquid/sbin/squid -NCd1</span></span></div></blockquote></div></blockquote><div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div><span><span style="font-family:Arial;font-size:14.6666666666667px;line-height:1.38;white-space:pre-wrap;background-color:transparent"><br></span></span></div><div><span id="docs-internal-guid-ad1eb627-a907-f06b-3ba5-7d320887e4a9"><span style="font-family:Arial;font-size:14.6666666666667px;line-height:1.38;white-space:pre-wrap;background-color:transparent">I get:</span></span></div></blockquote></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div><span id="docs-internal-guid-ad1eb627-a907-f06b-3ba5-7d320887e4a9"><span style="font-family:Arial;font-size:14.6666666666667px;font-weight:700;line-height:1.38;white-space:pre-wrap;background-color:transparent">FATAL: Ipc::Mem::Segment::create failed to shm_open(/squid-cf__metadata.shm): (13) Permission denied</span></span></div></blockquote></div></blockquote><div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div><span><span style="font-family:Arial;font-size:14.6666666666667px;line-height:1.38;white-space:pre-wrap;background-color:transparent"><br></span></span></div><div><span id="docs-internal-guid-ad1eb627-a907-f06b-3ba5-7d320887e4a9"><span style="font-family:Arial;font-size:14.6666666666667px;line-height:1.38;white-space:pre-wrap;background-color:transparent">It didn’t help to make the owner of the "squid-cf*" files to cache_effective_user as suggested in an online post:</span></span></div></blockquote></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div><span id="docs-internal-guid-ad1eb627-a907-f06b-3ba5-7d320887e4a9"><span style="font-family:Arial;font-size:14.6666666666667px;line-height:1.38;white-space:pre-wrap;background-color:transparent"><b>-rw------- 1 proxy mysquid 8 Sep 7 09:31 /dev/shm/squid-cf__metadata.shm</b></span></span></div></blockquote></div><div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div><span id="docs-internal-guid-ad1eb627-a907-f06b-3ba5-7d320887e4a9"><span style="font-family:Arial;font-size:14.6666666666667px;line-height:1.38;white-space:pre-wrap;background-color:transparent"><b>-rw------- 1 proxy mysquid 8216 Sep 7 09:31 /dev/shm/squid-cf__queues.shm</b></span></span></div></blockquote></div><div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div><span id="docs-internal-guid-ad1eb627-a907-f06b-3ba5-7d320887e4a9"><span style="font-family:Arial;font-size:14.6666666666667px;line-height:1.38;white-space:pre-wrap;background-color:transparent"><b>-rw------- 1 proxy mysquid 44 Sep 7 09:31 /dev/shm/squid-cf__readers.shm</b></span></span></div></blockquote></div></blockquote><div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div><span id="docs-internal-guid-ad1eb627-a907-f06b-3ba5-7d320887e4a9"><font face="Arial"><span style="font-size:14.6666669845581px"><br></span></font></span></div><div><span id="docs-internal-guid-ad1eb627-a907-f06b-3ba5-7d320887e4a9"><span style="font-family:Arial;font-size:14.6666666666667px;white-space:pre-wrap;background-color:transparent">d) The configuration file:</span></span></div></blockquote></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div><span id="docs-internal-guid-ad1eb627-a907-f06b-3ba5-7d320887e4a9"><span style="font-family:Arial;font-size:14.6666666666667px;font-weight:700;line-height:1.38;white-space:pre-wrap;background-color:transparent">/etc/squid3/squid.conf</span></span></div></blockquote></div></blockquote><div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div><span><span style="font-family:Arial;font-size:14.6666666666667px;line-height:1.38;white-space:pre-wrap;background-color:transparent"><br></span></span></div><div><span id="docs-internal-guid-ad1eb627-a907-f06b-3ba5-7d320887e4a9"><span style="font-family:Arial;font-size:14.6666666666667px;line-height:1.38;white-space:pre-wrap;background-color:transparent">is a lot different! For example I cannot find:</span></span></div></blockquote></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div><span id="docs-internal-guid-ad1eb627-a907-f06b-3ba5-7d320887e4a9"><span style="font-family:Arial;font-size:14.6666666666667px;font-style:italic;font-weight:700;line-height:1.38;white-space:pre-wrap;background-color:transparent">cache_effective_user</span></span></div></blockquote></div></blockquote><div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div><span><span style="font-family:Arial;font-size:14.6666666666667px;line-height:1.38;white-space:pre-wrap;background-color:transparent"><br></span></span></div><div><span id="docs-internal-guid-ad1eb627-a907-f06b-3ba5-7d320887e4a9"><span style="font-family:Arial;font-size:14.6666666666667px;line-height:1.38;white-space:pre-wrap;background-color:transparent">Can you point me to the updated documentation for configuring squid?</span></span></div><div><span id="docs-internal-guid-ad1eb627-a907-f06b-3ba5-7d320887e4a9"><br></span></div></blockquote><span style="font-family:Arial;font-size:14.6666666666667px;line-height:1.38;white-space:pre-wrap;background-color:transparent">Thanks,</span><br><div><span id="docs-internal-guid-ad1eb627-a907-f06b-3ba5-7d320887e4a9"><span style="font-family:Arial;font-size:14.6666666666667px;white-space:pre-wrap;background-color:transparent">Deiter</span></span></div><div><span id="docs-internal-guid-ad1eb627-a907-f06b-3ba5-7d320887e4a9"><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"></p></span></div><div><br></div><div><br></div><div>On Sun, Aug 30, 2015 at 12:15 PM, Amos Jeffries <span dir="ltr"><<a href="mailto:squid3@treenet.co.nz" target="_blank">squid3@treenet.co.nz</a>></span> wrote:<br></div><div><div class="gmail_extra"><div class="gmail_quote"><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>On 31/08/2015 5:27 a.m., Howard Waterfall wrote:<br>
> Thanks again, this is valuable information!<br>
><br>
> As you may have guessed, I'm asking about the user that should do builds to<br>
> ensure that the build outputs are created with the appropriate permissions<br>
> - I get a little concerned about security. It sounds like you are<br>
> suggesting that I simply create a directory for my custom builds:<br>
><br>
> I assign the --prefix option to the folder I create, so my build output<br>
> goes there, and then I make sure the permissions for that folder (and it's<br>
</span>> sub-directories) are set for the user defined by *cache_effective_user* (and<br>
> the user defined by the ./configure option --*with-default-user*). Could<br>
> you confirm?<br>
<br>
Ah, no.<br>
<br>
You set ownership of the /proxy folder to whoever amongst the local<br>
machine user accounts you want to have the ability to build and alter<br>
the custom Squid binaries etc. Pretty much Admin powers over Squid.<br>
<br>
The make process should install the sub-folders with correct permissions<br>
for the users that will be involved at run-time.<br>
<br>
Running the init script / squid as root will take care of the rest.<br>
<br>
[ "the rest" being:<br>
<br>
The init script runs as root and starts the 'master process' with root<br>
privileges. That process creates the run-time files and logs etc with<br>
correct permissions for the effective-user account to access.<br>
<br>
The effective-user account is the low-privilege one named in<br>
--with-default-user and can read/exec the things it needs but not write<br>
outside the few things the master has explicitly given it ownership of<br>
(ie those run-time PID file, logs).<br>
<br>
]<br>
<br>
PS.<br>
You do not need to work with both --with-default-user and<br>
cache_effective_user. All the ./configure option does is set the<br>
built-in cache_effective_user default value.<br>
<br>
The intention was that you use the ./configure option and omit the<br>
squid.conf option.<br>
<br>
<br>
NP: if you find that /proxy/var/run or /proxy/var/run/squid is missing<br>
(sometimes it is). Then create those with 777 permission and owner/group<br>
of the Admin account.<br>
<span><br>
><br>
> Finally (I hope), I've re-installed Ubuntu (various reasons, not just squid<br>
> issues) and I successfully installed squid using:<br>
</span>> *sudo apt-get install squid3*<br>
<span>><br>
> Squid wasn't found the first time:<br>
</span>> *E: Unable to locate package squid3*<br>
<span>><br>
> I had to run this first:<br>
</span>> *sudo apt-get update*<br>
><br>
> However, when I try *apt-get build-dep squid,* I get:<br>
> *You must put some 'source' uris in your sources.list*<br>
<span>><br>
> I can't seem to get over this problem. I've un-commented every line in<br>
</span>> */etc/apt/sources.list* that starts with deb-src.<br>
><br>
> Could you suggest a repository that I can add to */etc/apt/sources.list*?<br>
<br>
It should be exactly the same as your normal "deb" sources.list line.<br>
But with "deb-src" at the front. Usually the single line directly<br>
underneath what you had uncommented before.<br>
<br>
Mine looks like this:<br>
<br>
deb <a href="http://ftp.debian.org/debian" rel="noreferrer" target="_blank">http://ftp.debian.org/debian</a> unstable main contrib<br>
deb-src <a href="http://ftp.debian.org/debian" rel="noreferrer" target="_blank">http://ftp.debian.org/debian</a> unstable main contrib<br>
<br>
Where I have "unstable" you would have the Ubuntu 14.04 version name<br>
(trusty?). And different server of course.<br>
<br>
Sorry for the vagueness there. I dont work directly with Ubuntu anymore.<br>
<br>
The Ubuntu guys did a weird transition from squid3 to squid package<br>
names and insisted on doing it well before the Squid-3 code could handle<br>
the 2.7 upgrades. So things are a bit funky IMHO.<br>
<br>
Anyhow, the source package name I think is still "squid3" which should<br>
build the binary packages "squid" and "squid-common"<br>
(then: dpkg --install squid-common_*.deb squid_*.deb ).<br>
<span><font color="#888888"><br>
Amos<br>
</font></span></blockquote></div><br></div></div><div class="gmail_extra"><br></div></div></div>