improve finder for botched permissions

This commit is contained in:
Thorsten von Eicken 2016-05-23 20:45:58 -07:00
parent 288e79f59e
commit 1ff72b2faf
1 changed files with 1 additions and 1 deletions

View File

@ -247,7 +247,7 @@ else
fi fi
# Fix permissions, but skip this if 3 levels deep the user id is already set # 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" echo "Fixing /var/mail permissions"
chown -R 5000:5000 /var/mail chown -R 5000:5000 /var/mail
else else