diff --git a/core/admin/start.py b/core/admin/start.py index d9fa6bef..e2163398 100755 --- a/core/admin/start.py +++ b/core/admin/start.py @@ -7,7 +7,6 @@ import sys 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/core/rspamd/start.py b/core/rspamd/start.py index 0f351057..37de1df9 100755 --- a/core/rspamd/start.py +++ b/core/rspamd/start.py @@ -35,4 +35,5 @@ while True: # Run rspamd os.system("mkdir -m 755 -p /run/rspamd") os.system("chown rspamd:rspamd /run/rspamd") +os.system("find /var/lib/rspamd | grep -v /filter | xargs -n1 chown rspamd:rspamd") os.execv("/usr/sbin/rspamd", ["rspamd", "-f", "-u", "rspamd", "-g", "rspamd"])