Re: [Dovecot] shared mailbox subfolder permissions

2007-09-08 Thread Timo Sirainen
On Sat, 2007-08-18 at 13:16 +0200, David Leuschner wrote:
 when I create a subfolder in a public mailbox the dovecot-shared file is
 copied for the newly created subfolder and all mails get the owner, group
 and permissions from the file. Unfortunately the cur, new and tmp folders
 only get the permissions from the file but owner and group are set
 according to the creator. This effectivly makes the folder private to the
 creator. 
 
 Is this the intended behavior? Is it a bug that has already been fixed in
 a later version? I am using 1.0.rc29.

This should fix it: http://hg.dovecot.org/dovecot-1.0/rev/8c98ecd43a35

Also I think you can work around this by setting setgid bit for the root
Maildir.



signature.asc
Description: This is a digitally signed message part


[Dovecot] shared mailbox subfolder permissions

2007-08-19 Thread David Leuschner
Hi all,

when I create a subfolder in a public mailbox the dovecot-shared file is
copied for the newly created subfolder and all mails get the owner, group
and permissions from the file. Unfortunately the cur, new and tmp folders
only get the permissions from the file but owner and group are set
according to the creator. This effectivly makes the folder private to the
creator. 

Is this the intended behavior? Is it a bug that has already been fixed in
a later version? I am using 1.0.rc29.

An example follows. Thanks for your help!

   David

As an example .foobar was created manually (maildirmake) and permissions
were setup using the shell:

uml public # ls -al . .foobar
.:
total 24
drwxrwx--- 6 root pub  4096 Aug 18 13:05 .
drwxrwxr-x 3 root mail 4096 Aug 18 11:10 ..
drwxrwx--- 5 root pub  4096 Aug 18 11:42 .foobar
drwxrwx--- 2 root pub  4096 Aug 18 10:50 cur
-rw-rw 1 root pub 0 Aug 18 11:40 dovecot-shared
drwxrwx--- 2 root pub  4096 Aug 18 10:50 new
drwxrwx--- 2 root pub  4096 Aug 18 10:50 tmp

.foobar:
total 20
drwxrwx--- 5 root pub 4096 Aug 18 11:42 .
drwxrwx--- 6 root pub 4096 Aug 18 13:05 ..
drwxrwx--- 2 root pub 4096 Aug 18 11:42 cur
drwxrwx--- 2 root pub 4096 Aug 18 11:42 new
drwxrwx--- 2 root pub 4096 Aug 18 11:42 tmp

After creating a subfolder 'baz' with Thunderbird the group of .baz is the
group from dovecot-shared but the contained new/cur/tmp directories have
the users primary group (instead of pub).

uml public # ls -al . .baz 
.:
total 28
drwxrwx--- 7 root   pub  4096 Aug 18 13:09 .
drwxrwxr-x 3 root   mail 4096 Aug 18 11:10 ..
drwxrwx--- 5 dleuschner pub  4096 Aug 18 13:09 .baz
drwxrwx--- 5 root   pub  4096 Aug 18 11:42 .foobar
drwxrwx--- 2 root   pub  4096 Aug 18 10:50 cur
-rw-rw 1 root   pub 0 Aug 18 11:40 dovecot-shared
drwxrwx--- 2 root   pub  4096 Aug 18 10:50 new
drwxrwx--- 2 root   pub  4096 Aug 18 10:50 tmp

.baz:
total 20
drwxrwx--- 5 dleuschner pub4096 Aug 18 13:09 .
drwxrwx--- 7 root   pub4096 Aug 18 13:09 ..
drwxrwx--- 2 dleuschner dleuschner 4096 Aug 18 13:09 cur
-rw-rw 1 dleuschner pub   0 Aug 18 13:09 dovecot-shared
drwxrwx--- 2 dleuschner dleuschner 4096 Aug 18 13:09 new
drwxrwx--- 2 dleuschner dleuschner 4096 Aug 18 13:09 tmp

Here's my configuration:

listen: localhost
ssl_listen: *
ssl_ca_file: /root/ca/ca.crt
ssl_cert_file: /root/ca/crt/uml.crt
ssl_key_file: /root/ca/keys/uml.key
ssl_verify_client_cert: yes
verbose_ssl: yes
login_dir: /var/run/dovecot/login
login_executable: /usr/libexec/dovecot/imap-login
namespace:
  type: private
  separator: .
  prefix: Priv.
  location:
  maildir:~/.maildir:CONTROL=~/.maildir/ctrl/priv:INDEX=~/.maildir/idx/priv
  inbox: yes
namespace:
  type: public
  separator: .
  prefix: Pub.
  location:
  maildir:/var/mail/public:CONTROL=~/.maildir/ctrl/pub:INDEX=~/.maildir/idx/pub
auth default:
  passdb:
driver: pam
args: *
  userdb:
driver: passwd
  socket:
type: listen
client:
  path: /var/run/dovecot/auth-client
  mode: 432
master:

--
David Leuschner
Meisenweg 7
79211 Denzlingen
Tel. 07666/912466