I was able to get public folders to work with a dedicated account for
the hierarchy and ACL's for individual users.
I have location defined so that each user has a local index and control files
location =
maildir:/usr/mail/public/cs/mail:CONTROL=~/Maildir/CS:INDEX=~/Maildir/CS
Now i am seeing the folliwing error in the logs.
dovecot: IMAP(stephen): fchown() failed with file
/home/stephen/Maildir/CS/.Incoming/dovecot.index.log: Operation not
permitted
As I understand it, dovecot runs as root but the the IMAP process that
servicers the request runs as the user so naturally the fchown()
fails. However it seems the file is never even created. It there
someting I need to do to get this to work?
I am using 1.1.7
# 1.1.7: /etc/dovecot.conf
# OS: Linux 2.6.18-92.1.10.el5 x86_64 CentOS release 5.2 (Final)
protocols: imaps
ssl_cert_file: /etc/pki/dovecot/certs/scacifs02-lnx.dovecot.crt
ssl_key_file: /etc/pki/dovecot/private/scacifs02-lnx.dovecot.key
login_dir: /var/run/dovecot/login
login_executable: /usr/libexec/dovecot/imap-login
mail_location: maildir:~/Maildir
mbox_write_locks: fcntl
namespace:
type: private
separator: /
inbox: yes
list: yes
subscriptions: yes
namespace:
type: public
separator: /
prefix: CS/
location:
maildir:/usr/mail/public/cs/mail:CONTROL=~/Maildir/CS:INDEX=~/Maildir/CS
list: yes
auth default:
passdb:
driver: pam
userdb:
driver: passwd-file
args: /etc/imap.passwd
--
Stephen Carville
I checked the website and 1.1.11 is the latest stable version. I upgraded but the error persists. -- Stephen Carville
On Thu, 2009-03-12 at 11:11 -0700, Stephen Carville wrote:> dovecot: IMAP(stephen): fchown() failed with file > /home/stephen/Maildir/CS/.Incoming/dovecot.index.log: Operation not > permitted > > As I understand it, dovecot runs as root but the the IMAP process that > servicers the request runs as the user so naturally the fchown() > fails.fchown() only tries to change the group, not the owner. It's possible to make it succeed by making the process belong to the group. Do you have dovecot-shared file in the .Incoming/ directory? Dovecot tries to use that file's group. If you don't want it to do that, you can chmod g+s dovecot-shared and it's not preserved. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 197 bytes Desc: This is a digitally signed message part URL: <http://dovecot.org/pipermail/dovecot/attachments/20090313/2d5503f0/attachment-0002.bin>
On Fri, Mar 13, 2009 at 2:20 PM, Timo Sirainen <tss at iki.fi> wrote:> On Thu, 2009-03-12 at 11:11 -0700, Stephen Carville wrote: >> dovecot: IMAP(stephen): fchown() failed with file >> /home/stephen/Maildir/CS/.Incoming/dovecot.index.log: Operation not >> permitted >> >> As I understand it, dovecot runs as root but the the IMAP process that >> servicers the request runs as the user so naturally the fchown() >> fails. > > fchown() only tries to change the group, not the owner. It's possible to > make it succeed by making the process belong to the group.That explains a lot. thank you.> Do you have dovecot-shared file in the .Incoming/ directory? Dovecot > tries to use that file's group. If you don't want it to do that, you can > chmod g+s dovecot-shared and it's not preserved.I have dovecot-shared in the directory. The part that kept throwing me was that the user was a member if the group (cs). I finally discovered that adding a user to the group must be accompanied by adding userdb_system_user=username to the imap.passwd file. -- Stephen Carville