On Tue, 13 Apr 2010, Andrew Daviel wrote:

> On Mon, 12 Apr 2010, Mark Crispin wrote:
>
> > On Mon, 12 Apr 2010, Andrew Daviel wrote:
> >> - question: if using the MIX format, what happens to the ownership and
> >> permissions of new folder fragments (whatever .mixnnn files are called)
> >> in shared folders ? Do they get set with mode 600 hence become unreadable
> >> by other group members ?
> >
> > Mailboxes in #shared are created with mode 660 for files and 770 for
> > directories.
>
> I created a group writable folder viz.
> drwxr-xr-x  6 imapshared imapshared /home/imapshared/
> drwxrwx---  4 imapshared CCN  /home/imapshared/CCN
> drwxrwx---  2 imapshared CCN  /home/imapshared/CCN/INBOX/
> -rw-rw----  1 imapshared CCN  /home/imapshared/CCN/INBOX/.mix4bc4ef04
>
> An email account "sharetest" which is a member of CCN can deliver mail to
> it using  "dmail +#shared/CCN/INBOX"
> and members of the group CCN can read it. So far so good.
>
> However, if a member of CCN "andrew" writes a lot of messages into
> this folder using IMAP, the next datafile is created belonging to
> him, viz.
> -rw-rw----  1 andrew andrew /home/imapshared/CCN/INBOX/.mix4bc51158
> Subsequent messages cannot be delivered from dmail, because the file is
> no longer writable.

Use the Unix "group SGID bit" on the directory to force new files to
keep the desired group membership. Using your example:

 drwxrwx---  4 imapshared CCN  /home/imapshared/CCN
 drwxrws---  2 imapshared CCN  /home/imapshared/CCN/INBOX/
 -rw-rw----  1 imapshared CCN  /home/imapshared/CCN/INBOX/.mix4bc4ef04
 -rw-rw----  1 andrew     CCN  /home/imapshared/CCN/INBOX/.mix4bc51158

Note the 'SGID' bit on the INBOX directory.
Then when your user "andrew" creates a new  MIX datafile in that INBOX
directory it will be group CCN.

This is just classical Unix permissions voo-doo which came out of BSD
land. Ancient sys-V Unix varients may not implement it, but all
this-millenium Unix varients should. ;)

Depending upon the OS/filesystem features you also may be able to
use ACLs.


-- 
Dave Funk                                  University of Iowa
<dbfunk (at) engineering.uiowa.edu>        College of Engineering
319/335-5751   FAX: 319/384-0549           1256 Seamans Center
Sys_admin/Postmaster/cell_admin            Iowa City, IA 52242-1527
#include <std_disclaimer.h>
Better is not better, 'standard' is better. B{
_______________________________________________
Imap-uw mailing list
[email protected]
http://mailman2.u.washington.edu/mailman/listinfo/imap-uw

Reply via email to