From 38594bd2566650276856b62efd6492442d4457a8 Mon Sep 17 00:00:00 2001 From: jim-p Date: Mon, 2 May 2011 14:57:59 -0400 Subject: When making the cache and doing squid -z, it should be safe to do a recursive chown on what should be a small directory set. --- config/squid/squid.inc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/config/squid/squid.inc b/config/squid/squid.inc index 5a17d8c9..5b876f3f 100644 --- a/config/squid/squid.inc +++ b/config/squid/squid.inc @@ -88,7 +88,8 @@ function squid_dash_z() { if(!is_dir($cachedir.'/')) { log_error("Creating Squid cache dir $cachedir"); make_dirs($cachedir); - squid_chown_recursive($cachedir, 'proxy', 'proxy'); + // Double check permissions here, should be safe to recurse cache dir if it's small here. + mwexec("/usr/sbin/chown -R proxy:proxy $cachedir"); } if(!is_dir($cachedir.'/00/')) { @@ -96,6 +97,8 @@ function squid_dash_z() { mwexec("/usr/local/sbin/squid -k shutdown"); sleep(5); mwexec("/usr/local/sbin/squid -k kill"); + // 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/local/sbin/squid -z"); } -- cgit v1.2.3