From 44c47586eaa6798809cac77f6967e57c5173d2ab Mon Sep 17 00:00:00 2001 From: Florent Daigniere Date: Mon, 21 Nov 2022 17:50:57 +0100 Subject: [PATCH] Fix potential permission problems --- core/admin/start.py | 4 +++- towncrier/newsfragments/2539.misc | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/core/admin/start.py b/core/admin/start.py index 99b34a01..d9fa6bef 100755 --- a/core/admin/start.py +++ b/core/admin/start.py @@ -5,7 +5,9 @@ import logging as log from pwd import getpwnam import sys -os.system("chown mailu:mailu -R /data /dkim") +os.system("chown mailu:mailu -R /dkim") +os.system("find /data | grep -v /fetchmail | xargs -n1 chown mailu:mailu") +os.system("find /var/lib/rspamd | grep -v /filter | xargs -n1 chown mailu:mailu") mailu_id = getpwnam('mailu') os.setgid(mailu_id.pw_gid) os.setuid(mailu_id.pw_uid) diff --git a/towncrier/newsfragments/2539.misc b/towncrier/newsfragments/2539.misc index 0d9907ac..10e3954e 100644 --- a/towncrier/newsfragments/2539.misc +++ b/towncrier/newsfragments/2539.misc @@ -1 +1 @@ -Upgrade to Alpine 3.16.3; Make setup, admin and rspamd run without root privs. +Upgrade to Alpine 3.16.3; Make setup, admin and rspamd run without root privs. Please ensure that your folder overrides/rspamd is owned by 1000:1000