[Dovecot] Shared Folders

Stephen Carville stephen.carville at gmail.com
Wed Mar 11 07:14:04 EET 2009


On Tue, Mar 10, 2009 at 5:46 PM, Timo Sirainen <tss at iki.fi> wrote:
> On Mar 10, 2009, at 8:21 PM, Stephen Carville wrote:
>
>> Mar 10 16:45:17 scacifs02-lnx dovecot: IMAP(stephen):
>> mkdir(/var/mail/CS/cur) failed: Permission denied
>> Mar 10 16:45:28 scacifs02-lnx dovecot: IMAP(stephen): Connection closed
>>
>> whats happening here?  Why is dovecot even trying to create
>> var/mail/CS/cur?
>>
>> Version = 1.0.7
>
> Because v1.0 is buggy here and always tries to create the Maildir
> directories. Either create the cur/new/tmp for it or upgrade to v1.1.
>
>

Still no joy

My account on the imap server
$ id stephen
uid=501(stephen) gid=100(users) groups=10(wheel),100(users),1000(cs)

shared account user
$ id cs
uid=1000(cs) gid=1000(cs) groups=1000(cs)

as user=stephen (some hidden files removed from listing)

$ ls -lA /var/spool/mail/public
total 20
drwxrwx--- 4 cs   cs    4096 Mar 10 21:26 cs
drwx------ 2 root root 16384 Mar 10 12:08 lost+found

$ ls -lA /var/spool/mail/public/cs
total 40
drwxrwx--- 6 cs cs 4096 Mar 10 21:26 mail

$ ls -lA /var/spool/mail/public/cs/mail
total 16
drwxrwx--- 2 cs cs 4096 Mar 10 21:09 cur
-rw-rw---- 1 cs cs    0 Mar 10 19:56 dovecot-shared
drwxrwx--- 5 cs cs 4096 Mar 10 21:01 .Incoming
drwxrwx--- 2 cs cs 4096 Mar 10 21:09 new
drwxrwx--- 2 cs cs 4096 Mar 10 21:09 tmp

$ ls -lA /var/spool/mail/public/cs/mail/.Incoming
total 12
drwxrwx--- 2 cs cs 4096 Mar 10 21:01 cur
-rw-rw---- 1 cs cs    0 Mar 10 21:01 dovecot-shared
drwxrwx--- 2 cs cs 4096 Mar 10 21:01 new
drwxrwx--- 2 cs cs 4096 Mar 10 21:01 tmp

Now when I try to subscribe

Mar 10 21:37:19 scacifs02-lnx dovecot: IMAP(stephen):
opendir(/var/spool/mail/public/cs/mail) failed: Permission denied
Mar 10 21:37:19 scacifs02-lnx dovecot: IMAP(stephen): Connection closed

This make no sense to me.  I am a member if the cs group which has rwx
perms for all the directories from cs on down.  How can I not have
permission to open the directory?

In fact:

$ perl -e 'opendir DIR,"/var/spool/mail/public/cs/mail" or die
$!;@aa=readdir(DIR);close DIR;foreach(@aa){print "$_\n";}'
.
cur
new
.Incoming
..
tmp

So I do have permission to open the directory but dovecot doesn't
agree  (Is this a sign I should just give up on 1.0.7? :-)

My config changed a bit:

# 1.0.7: /etc/dovecot.conf
protocols: imaps
listen: *
ssl_cert_file: /etc/pki/dovecot/certs/scacifs02-lnx.dovecot.crt
ssl_key_file: /etc/pki/dovecot/private/scacifs02-lnx.dovecot.key
disable_plaintext_auth: yes
login_dir: /var/run/dovecot/login
login_executable: /usr/libexec/dovecot/imap-login
mail_location: maildir:~/Maildir
maildir_copy_with_hardlinks: yes
namespace:
  type: private
  separator: /
  inbox: yes
namespace:
  type: public
  separator: /
  prefix: CS/
  location: maildir:/var/spool/mail/public/cs/mail:CONTROL=~/Maildir/CS:INDEX=~/Maildir/CS
auth default:
  debug: yes
  passdb:
    driver: pam
  userdb:
    driver: passwd-file
    args: /etc/imap.passwd


-- 
Stephen Carville


More information about the dovecot mailing list