[Dovecot] permissions for dbox attachment directory
tss at iki.fi
Thu Jun 30 08:13:16 EEST 2011
On Tue, 2011-06-28 at 10:08 -0400, imap at tnde.org wrote:
> > 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/attachments
> > Currently 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.
> Ok, if I understand you correctly, I would need to chmod to 660/770, but
> it would only work on existing folders, and every new item will be created
> as 600/700?
Yes, that's why I suggested modifying the source code so new items would
be created with correct mode too.
> I guess the best way is setting up virtual users, presumably these work
> under a single system account? (for the time being this is running on a
> test server, using the simplest setup with system users)
Yeah, that's the easiest solution.
More information about the dovecot