From f5a96000c55d19797abdb4c4a943459e0cd33739 Mon Sep 17 00:00:00 2001 From: lapineige Date: Tue, 14 Feb 2023 21:04:52 +0100 Subject: [PATCH] Restrict permission on log file Incorrect permissions make logrotate fails `error: skipping "/var/log/pixelfed/pixelfed-horizon.log" because parent directory has insecure permissions (It's world writable or writable by group which is not "root") Set "su" directive in config file to tell logrotate which user/group should be used for rotation.` --- scripts/upgrade | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/upgrade b/scripts/upgrade index 862c6df5..226cda40 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -223,6 +223,7 @@ ynh_script_progression --message="Creating log file..." --weight=1 mkdir -p "/var/log/$app/" touch "/var/log/$app/${app}-horizon.log" chown -R $app: "/var/log/$app/" +chmod 600 $app: "/var/log/$app/" #================================================= # UPGRADE THE CRON FILE