diff options
author | jim-p <jimp@pfsense.org> | 2011-05-02 14:57:59 -0400 |
---|---|---|
committer | jim-p <jimp@pfsense.org> | 2011-05-02 14:57:59 -0400 |
commit | 38594bd2566650276856b62efd6492442d4457a8 (patch) | |
tree | 900abb6bb408303cff06a02c6bf911cc33ae9773 /config | |
parent | fd27296d65a33e68f89846831ba45178df3a56fb (diff) | |
download | pfsense-packages-38594bd2566650276856b62efd6492442d4457a8.tar.gz pfsense-packages-38594bd2566650276856b62efd6492442d4457a8.tar.bz2 pfsense-packages-38594bd2566650276856b62efd6492442d4457a8.zip |
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.
Diffstat (limited to 'config')
-rw-r--r-- | config/squid/squid.inc | 5 |
1 files changed, 4 insertions, 1 deletions
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"); } |