dovecot new user directory has 750 instead of 770

Version 1.262


If you create a new pop account with spam turned ON, DA will create the full path to the user for the spambox, eg: /home/username/imap/ The bug happened as a result of the mkdir(path,mode) function. The correct mode was being passed to the function S_IRWXU | S_IRWXG (770), but it was creating the driectories with 750, likely due to the umask (mkdir uses 'mode & ~umask & 0777'). So the fix is to run a chmod after each mkdir so as to not trust the mkdir function for setting the correct mode.

Interested to try DirectAdmin? Get a 30-day Free Trial!