From a3e6c7c09976204363add3bac8c6d000fdc6916c Mon Sep 17 00:00:00 2001 From: Renato Botelho Date: Tue, 5 May 2015 12:06:40 -0300 Subject: Respect SQUID_[UG]ID --- config/squid3/34/squid.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'config/squid3/34') diff --git a/config/squid3/34/squid.inc b/config/squid3/34/squid.inc index e65a3508..25d85361 100755 --- a/config/squid3/34/squid.inc +++ b/config/squid3/34/squid.inc @@ -137,13 +137,13 @@ function squid_dash_z($cache_action='none') { @chgrp($cachedir, SQUID_GID); } - if (!is_dir($cachedir.'/00/')) { + if (!is_dir($cachedir.'/00')) { log_error("Creating squid cache subdirs in $cachedir"); mwexec(SQUID_BASE. "/sbin/squid -k shutdown -f " . SQUID_CONFFILE); sleep(5); mwexec(SQUID_BASE. "/sbin/squid -k kill -f " . SQUID_CONFFILE); // Double check permissions here, should be safe to recurse cache dir if it's small here. - mwexec("/usr/sbin/chown -R proxy:proxy $cachedir"); + mwexec("/usr/sbin/chown -R " . SQUID_UID . ":" . SQUID_GID . " $cachedir"); mwexec(SQUID_BASE. "/sbin/squid -z -f " . SQUID_CONFFILE); } -- cgit v1.2.3