Squid permissions problems: winbind_privileged

Q I had a Squid box working fine, but a power spike took out the boot sector of the disk. I have reinstalled (and taken the time to upgrade to Debian Etch). My problem is that the winbind_privileged folder is dynamically created at boot time. When it is created, the permissions are wrong. I need them to be root:proxy so that the proxy server can use the AD [Active Directory] authentication. How can I go about fixing this problem?

A The only reliable solution to this appears to be the slightly kludgy one: to allow the directory to be created and then change the group ownership. Using your favourite text editor, as root, edit the file /etc/rc.local and add the following before the final exit line:

if [[ -d /path/to/winbind_privileged
]]
then
chgrp proxy /path/to/winbind_
privileged
fi

Use the correct path for the winbind_privileged directory, of course. This script is run right at the end of the boot process. If you need to issue this command sooner, say immediately after Squid starts, you need to create a separate script. Put these lines into /etc/init.d/fixsquid:

#!/bin/sh
if [[ -d /path/to/winbind_privileged
]]
then
chgrp proxy /path/to/winbind_
privileged
fi

Once again, use the correct path for the winbind_privileged directory. Now make it executable and set it to run at just after Squid is started with by running these commands as root:

chmod +x /etc/init.d/fixsquid
ln -s ../init.d/fixsquid /etc/rc2.d/S35fixsquid

Init scripts are run in alphanumeric order, and Squid is run from S30squid, so this runs it soon after that (the S means a startup script; names that begin with K are run on shutdown to Kill the process).

Back to the list