I cant figure out permissions with Dovecot. I am new with this program and have tried setting the mail group to "mail" which is the group of my mailboxes which are located in /var/spool/mail. Here's the error I get. fs1 dovecot: imap(tl511insight): Error: chown(/home/tl511insight/mail/.imap/INBOX, -1, 12(mail)) failed: Operation not permitted (egid=504(tl511insight), group based on /var/mail/tl511insight) Apr 7 07:44:51 fs1 dovecot: imap(tl511insight): Error: mkdir(/home/tl511insight/mail/.imap/INBOX) failed: Operation not permitted Apr 7 07:44:51 fs1 dovecot: imap(tim): Error: chown(/home/tim/mail/.imap/INBOX, -1, 97(dovecot)) failed: Operation not permitted (egid=500(tim), group based on /var/mail/tim) Apr 7 07:44:51 fs1 dovecot: imap(tim): Error: mkdir(/home/tim/mail/.imap/INBOX) failed: Operation not permitted How do I give permissions to dovecot program to create these? I am trying not to chmod 777 every mailbox. -- View this message in context: http://old.nabble.com/Permission-Denied---cannot-create-inbox-tp31341777p31341777.html Sent from the Dovecot mailing list archive at Nabble.com.
tlmoore at gmail.com writes:> Apr 7 07:44:51 fs1 dovecot: imap(tim): Error: > chown(/home/tim/mail/.imap/INBOX, -1, 97(dovecot)) failed: Operation not > permitted (egid=500(tim), group based on /var/mail/tim) > > How do I give permissions to dovecot program to create these? I am trying > not to chmod 777 every mailbox.I was going to write about the same problem. This got me over the hump: chmod 0600 /var/spool/mail/* All my user's mailboxes used to be group=mail mode=0660. I think these settings were left over from Solaris' mail.local: I can't reproduce these permissions now, even for new mailboxes. Maybe it's because the spool directory is now mode=1777 (not g+s mail). Not too keen on these permissions either, but it seems to work. Dovecot seems to transfer group permissions of the mailbox to its corresponding cache. If it can't set group ownership, you get the fatal error message above. If the original mailbox is mode 0600, dovecot is smart enough not to set group ownership. I couldn't find this information: shouldn't it be documented here? http://wiki2.dovecot.org/SharedMailboxes/Permissions This situation could also happen if a user is revoked from a group's membership. Would it be useful to make this a configurable behaviour whereby a chgrp() failure of cache files will fall back to chown'ing to user=owner, mode=0600 instead? Or just leave the user to scratch their head? Joseph Tam <tam at math.ubc.ca>
Timo Sirainen <tss at iki.fi> writes:> This is anyway mbox-specific problem, so I added it now to mbox page: > > http://wiki2.dovecot.org/MailLocation/mbox...>> imap(tss): Error: >> fchown(/home/tss/mail/.imap/INBOX/dovecot.index.log.newlock, >> group=8(mail)) failed: Operation not permitted (egid=1000(tss), group >> based on /var/mail/tss - see http://wiki2.dovecot.org/Errors/NoPerm) >> > Changed the wiki link: http://wiki2.dovecot.org/Errors/ChgrpNoPermThanks, Timo. This will be opaque to the user, but I don't think it will happen often so it's no bother to find the problem in the logs. Joseph Tam <jtam.home at gmail.com>