mirror of
https://github.com/docker-mailserver/docker-mailserver.git
synced 2025-07-13 19:04:50 +02:00
chore: Extract out /var/mail
ownership workaround (#2628)
Keep it in sync between the two locations via shared helper method.
This commit is contained in:
parent
4b37cb5383
commit
0a722276a8
3 changed files with 21 additions and 12 deletions
|
@ -17,14 +17,8 @@ function _fix_var_mail_permissions
|
|||
{
|
||||
_log 'debug' 'Checking /var/mail permissions'
|
||||
|
||||
# fix permissions, but skip this if 3 levels deep the user id is already set
|
||||
if find /var/mail -maxdepth 3 -a \( \! -user 5000 -o \! -group 5000 \) | read -r
|
||||
then
|
||||
_log 'trace' 'Fixing /var/mail permissions'
|
||||
chown -R 5000:5000 /var/mail || _shutdown 'Failed to fix /var/mail permissions'
|
||||
else
|
||||
_log 'trace' 'Permissions in /var/mail look OK'
|
||||
fi
|
||||
_chown_var_mail_if_necessary || _shutdown 'Failed to fix /var/mail permissions'
|
||||
_log 'trace' 'Permissions in /var/mail look OK'
|
||||
}
|
||||
|
||||
function _fix_var_amavis_permissions
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue