[Dovecot] file system permissions

Timo Sirainen tss at iki.fi
Sun Jan 20 09:45:08 EET 2008


On Sun, 2008-01-13 at 18:37 -0800, Anil wrote:
> I am using Maildir and virtual domains.
> 
> I have the following definitions in the dovecot.conf:
> mail_uid = 10000
> mail_gid = 10000
> mail_location = maildir:/var/mail/apps/%d/%n/Maildir
> ...
..
> I set the permissions of /var/mail/apps, /var/mail/apps/%d directories 1777.
..
> I also see the following error message when a message is received to
> one of the users:
> Jan 13 18:33:33 vds5 deliver(admin at domain.com): [ID 702911 mail.error]
> stat(/var/mail/apps/domain.com/admin/Maildir/tmp) failed: Permission
> denied
> 
> 
> The permissions of this tmp directory are:
> drwx------   2 vmail    vmail          2 Jan 13 18:31 tmp

Assuming vmail is 10000 it looks ok.

> Why is deliver having problems writing to that? At this point, what
> uid is deliver running as?

10000. Since this has been such a common problem, I finally added some
code to make it clearly log what uid/gid it's running as and what
directory has the permission problem:
http://hg.dovecot.org/dovecot/rev/93fe72ef59f6
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://dovecot.org/pipermail/dovecot/attachments/20080120/d1443089/attachment-0001.bin 


More information about the dovecot mailing list