Fixes #507 permissions on /var/lib/amavis (#510)

This commit is contained in:
Thomas VIAL 2017-02-07 20:53:34 +01:00 committed by GitHub
parent 5abff5208e
commit 0a6733c65a

View file

@ -124,6 +124,7 @@ function register_functions() {
################### >> fix funcs
_register_fix_function "_fix_var_mail_permissions"
_register_fix_function "_fix_var_amavis_permissions"
################### << fix funcs
@ -912,6 +913,19 @@ function _fix_var_mail_permissions() {
return 0
fi
}
function _fix_var_amavis_permissions() {
notify 'task' 'Fixing /var/lib/amavis permissions'
if [ `find /var/lib/amavis -maxdepth 3 -a \( \! -user amavis -o \! -group amavis \) | grep -c .` != 0 ]; then
notify 'inf' "Fixing /var/lib/amavis permissions"
chown -R amavis:amavis /var/lib/amavis
else
notify 'inf' "Permissions in /var/lib/amavis look OK"
return 0
fi
}
##########################################################################
# << Fix Stack
##########################################################################