From 7c070039cf7717973d79414047e0fc8e9b343c23 Mon Sep 17 00:00:00 2001 From: Renato Botelho Date: Tue, 5 May 2015 12:05:10 -0300 Subject: We just created directory, no need for recursive chown call --- config/squid3/34/squid.inc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'config') diff --git a/config/squid3/34/squid.inc b/config/squid3/34/squid.inc index e2b95adb..11d445d4 100755 --- a/config/squid3/34/squid.inc +++ b/config/squid3/34/squid.inc @@ -130,11 +130,11 @@ function squid_dash_z($cache_action='none') { mwexec_bg("/bin/rm -rf {$cachedir}.old"); } - if (!is_dir($cachedir.'/')) { + if (!is_dir($cachedir)) { log_error("Creating Squid cache dir {$cachedir}"); @mkdir($cachedir, 0755, true); - // Double check permissions here, should be safe to recurse cache dir if it's small here. - mwexec("/usr/sbin/chown -R proxy:proxy $cachedir"); + @chown($cachedir, SQUID_UID); + @chgrp($cachedir, SQUID_GID); } if (!is_dir($cachedir.'/00/')) { -- cgit v1.2.3