From ca3962ba05a0ab3d1f148c3e25e96b6cb1be64b7 Mon Sep 17 00:00:00 2001 From: Lukas Macura Date: Tue, 19 Apr 2016 15:59:45 +0200 Subject: [PATCH] cache-clean sets right permissions --- lib/cache.lib.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/cache.lib.sh b/lib/cache.lib.sh index 8ae1378..80a6036 100644 --- a/lib/cache.lib.sh +++ b/lib/cache.lib.sh @@ -8,6 +8,10 @@ zaf_cache_clean(){ zaf_err "Cache dir not set." fi mkdir -p "$ZAF_CACHE_DIR" + if zaf_is_root; then + chmod g+rwx "$ZAF_CACHE_DIR" + chgrp zabbix "$ZAF_CACHE_DIR" + fi } # Get cache key from requested param