0

Today I installed Dovecot from source and after configuration and some testing I got error ChgrpNoPerm, which is described here. After reading and misunderstanding I recursively chmod-ed /var/spool/mail/ (mail directory) to 777 and I haven't got any error anymore. Was chmod-ing directory bad solution? Here is my configuration, in case problem is there.

# 2.0.13: /usr/local/etc/dovecot/dovecot.conf
# OS: Linux 2.6.32.25 x86_64 Slackware 13.1.0 simfs
disable_plaintext_auth = no
listen = *
mail_location = mbox:/var/spool/mail:INBOX=/var/spool/mail/%u
passdb {
  driver = shadow
}
protocols = imap pop3
ssl_cert = </etc/ssl/certs/dovecot.pem
ssl_key = </etc/ssl/private/dovecot.pem
syslog_facility = dovecot
userdb {
  driver = passwd
}
Matej
  • 1

1 Answers1

1

Actually the correct permission on /var/spool/mail is: 1777 owner: root group: root

The addition of the sticky bit on the mail directory prevents users from deleting each others mailbox.

mdpc
  • 11,856
  • 28
  • 53
  • 67
  • Thanks for correction, chmod-ed to 1777 recursively, but I asked if it was good idea to chmod it so all users can read each other mailbox. isn't any better solution than that? – Matej Aug 11 '11 at 20:20
  • Actually the files contained in the /var/spool/mail are owned by specific users. Nobody else has R/W permission. For example, for user 'abcd', the file /var/spool/mail/abcd would be owned by abcd with permission 0600. – mdpc Aug 11 '11 at 21:29
  • ok, I and Dovecot are happy with 1777, so I am not going to change it again...but thanks for help – Matej Aug 11 '11 at 21:44