diff --git a/zabbix/zabbix_php_fpm_discovery.sh b/zabbix/zabbix_php_fpm_discovery.sh index 8d03f4c..95950d1 100644 --- a/zabbix/zabbix_php_fpm_discovery.sh +++ b/zabbix/zabbix_php_fpm_discovery.sh @@ -322,6 +322,11 @@ do fi done +if [[ -f ${CACHE_FILE} ]] && [[ ! -w ${CACHE_FILE} ]]; then + ${S_ECHO} "Error: write permission is not granted to user $ACTIVE_USER for cache file $CACHE_FILE" + exit 1 +fi + PrintDebug "Saving new cache file $CACHE_FILE..." ${S_PRINTF} "%s\n" "${NEW_CACHE[@]}" > ${CACHE_FILE}