From 1ff72b2faf62e66ff912d9ac9ce4a1f35b449065 Mon Sep 17 00:00:00 2001 From: Thorsten von Eicken Date: Mon, 23 May 2016 20:45:58 -0700 Subject: [PATCH] improve finder for botched permissions --- target/start-mailserver.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/start-mailserver.sh b/target/start-mailserver.sh index 72671547..6e8ba07b 100644 --- a/target/start-mailserver.sh +++ b/target/start-mailserver.sh @@ -247,7 +247,7 @@ else fi # Fix permissions, but skip this if 3 levels deep the user id is already set -if [ `find /var/mail -maxdepth 3 \! -user 5000 | grep -c .` != 0 ]; then +if [ `find /var/mail -maxdepth 3 -a \( \! -user 5000 -o \! -group 5000 \) | grep -c .` != 0 ]; then echo "Fixing /var/mail permissions" chown -R 5000:5000 /var/mail else