From 1ea7d93cd850e931f233c3b66641b592ed0005ff Mon Sep 17 00:00:00 2001 From: Lukas Macura Date: Thu, 21 Apr 2016 16:07:21 +0200 Subject: [PATCH] Right permissions on cache --- lib/cache.lib.sh | 2 +- zaf | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/cache.lib.sh b/lib/cache.lib.sh index 8b2ea2b..663138d 100644 --- a/lib/cache.lib.sh +++ b/lib/cache.lib.sh @@ -10,7 +10,7 @@ zaf_cache_clean(){ mkdir -p "$ZAF_CACHE_DIR" if zaf_is_root; then chmod 770 "$ZAF_CACHE_DIR" - chgrp zabbix "$ZAF_CACHE_DIR" + chgrp $(id -g zabbix) "$ZAF_CACHE_DIR" fi } diff --git a/zaf b/zaf index d8745f3..a389fda 100755 --- a/zaf +++ b/zaf @@ -64,8 +64,8 @@ if ! [ -d "${ZAF_CACHE_DIR}" ]; then fi if zaf_is_root; then - chgrp zabbix "${ZAF_CACHE_DIR}" - chmod g+w "${ZAF_CACHE_DIR}" + chgrp $(id -g zabbix) "${ZAF_CACHE_DIR}" + chmod 770 "${ZAF_CACHE_DIR}" fi case $1 in