Skip to content

Commit 05f4125

Browse files
committed
fix hestiacp#1095 User email had wrong permision causing issues with moving domains
Re-chowning as owner needs to be user:mail instead of user:user
1 parent 90f5e24 commit 05f4125

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

bin/v-restore-user

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -584,17 +584,15 @@ if [ "$mail" != 'no' ] && [ ! -z "$MAIL_SYSTEM" ]; then
584584
check_result "$E_PARSING" "$error"
585585
fi
586586

587-
# Re-chowning files if uid differs
588-
if [ "$old_uid" -ne "$new_uid" ]; then
589-
find $HOMEDIR/$user/mail/$domain_idn -user $old_uid \
590-
-exec chown -h $user:mail {} \;
591-
fi
587+
# Chowning as owner needs to be user:mail instead of user:user
588+
find $HOMEDIR/$user/mail/$domain_idn -user $old_uid \
589+
-exec chown -h $user:mail {} \;
592590
fi
593591

594592
# Chowning mail conf files to exim user
595593
find $HOMEDIR/$user/conf/mail/$domain_idn -user root \
596594
-exec chown $exim_user {} \;
597-
595+
598596
done
599597

600598
# Restarting web server

0 commit comments

Comments
 (0)