imap at tnde.org
2011-Jun-25 07:58 UTC
[Dovecot] permissions for dbox attachment directory
I am running dovecot 2.0.13 on CentOS5, set up with only local system users, and single instance store set up in a single directory. e.g. mail_attachment_dir = /var/mail/attachments I get errors when importing mail to IMAP because the attachment directories are owned by the respective mail account user(s) and so cannot be accessed or written to by other users. Are there some user id setting I need to change, or do I have to run dovecot with virtual users under a single system account? Thanks!
imap at tnde.org schreef:> I am running dovecot 2.0.13 on CentOS5, set up with only local system > users, and single instance store set up in a single directory. > > e.g. > mail_attachment_dir = /var/mail/attachments > > > I get errors when importing mail to IMAP because the attachment > directories are owned by the respective mail account user(s) and so cannot > be accessed or written to by other users. > > Are there some user id setting I need to change, or do I have to run > dovecot with virtual users under a single system account? > > Thanks! >Please post the exact error message, and the output of dovecot -n This way it is much easier for people to help you, and it takes less guessing what is going on. Gr Johan Hendriks Double L Automatisering
On Sat, 2011-06-25 at 03:58 -0400, imap at tnde.org wrote:> I am running dovecot 2.0.13 on CentOS5, set up with only local system > users, and single instance store set up in a single directory. > > e.g. > mail_attachment_dir = /var/mail/attachmentsCurrently you can't. I was a bit lazy in implementing this code not to preserve permissions. The idea would be anyway that you could make /var/mail/attachments 02770 and e.g. group=mail. Then set mail_access_groups=mail to Dovecot. Now the code should have created new directories under that with the same permissions and the files as 0660, but looks like it doesn't. The code is in src/lib-fs/fs-posix.c if you want to fix it yourself. You could as a workaround simply change all 0600 -> 0660 and 0700 -> 0770 and I guess it would work.