[Dovecot] Dovecot is not creating directories properly for new accounts

Chris Lasater vorgusa at gmail.com
Tue Sep 3 17:49:42 EEST 2013


Hi,
I have just set up a new dovecot server with Dovecot 2.2.5.  When I create
a new user and try to authenticate I get the following error

Sep 03 14:33:38 imap(test2): Error: user test2: Initialization failed:
Initializing mail storage from mail_location setting failed:
mkdir(/home/user/apps/var/mail/imap/test2/mailboxes) failed: Permission
denied (euid=503(imapd) egid=503(imapd) missing +w perm:
/home/user/apps/var/mail, we're not in group 502(dovecot), dir owned by
502:502 mode=0775)
Sep 03 14:33:38 imap(test2): Error: Invalid user settings. Refer to server
log for more information.

imapd is in the dovecot group and here are the permissions

[user at MB1 logs]$ ll /home/user/apps/var/
total 4
drwxrwxr-x 4 dovecot dovecot 4096 Sep  3 14:35 mail

[user at MB1 logs]$ id imapd
uid=503(imapd) gid=503(imapd) groups=503(imapd),500(user),502(dovecot)


if I su - imapd and then run mkdir -p
/home/user/apps/var/mail/imap/test2/mailboxes

everything starts working and the user can log in.  Isn't Dovecot supposed
to be able to create these?


More information about the dovecot mailing list