[Dovecot] Correct permissions for base_dir??
I am having problems with dovecot regarding base_dir:
I have ::
base_dir = /opt/dovecot2/var/run/
For some reason, I have to set permissions to(chmod -R 1777 /opt/dovecot2/var/) for dovecot to run properly, but when I start dovecot, I see this: [root@gw] /opt/dovecot2/etc/dovecot# less /var/log/dovecot/dovecot.log Oct 21 16:15:27 master: Warning: Killed with signal 15 (by pid=72634 uid=0 code=kill) Oct 21 16:15:27 master: Warning: Corrected permissions for login directory /opt/dovecot2/var/run/login Oct 21 16:15:27 master: Warning: Corrected permissions for empty directory /opt/dovecot2/var/run/empty Oct 21 16:15:27 master: Info: Dovecot v2.0.5 (38e726a2b3b9) starting up
Now, when I send a test mail:
[root@gw] /usr/home/wash# less /var/log/dovecot/dovecot.log Oct 21 16:15:27 master: Warning: Killed with signal 15 (by pid=72634 uid=0 code=kill) Oct 21 16:15:27 master: Warning: Corrected permissions for login directory /opt/dovecot2/var/run/login Oct 21 16:15:27 master: Warning: Corrected permissions for empty directory /opt/dovecot2/var/run/empty Oct 21 16:15:27 master: Info: Dovecot v2.0.5 (38e726a2b3b9) starting up Oct 21 16:33:18 lda: Debug: Loading modules from directory: /opt/dovecot2/lib/dovecot Oct 21 16:33:18 lda: Debug: Module loaded: /opt/dovecot2/lib/dovecot/lib10_quota_plugin.so Oct 21 16:33:18 lda: Error: userdb lookup: connect(/opt/dovecot2/var/run/auth-userdb) failed: Permission denied (euid=26(mailnull) egid=26(mailnull) missing +r perm: /opt/dovecot2/var/run/auth-userdb, euid is not dir owner) Oct 21 16:33:18 lda: Fatal: Internal error occurred. Refer to server log for more information.
My doveconf -n output:
OS: FreeBSD 8.1-RELEASE amd64
auth_cache_negative_ttl = 1 days auth_cache_size = 10 M auth_mechanisms = plain digest-md5 auth_socket_path = /opt/dovecot2/var/run/auth-userdb auth_verbose = yes base_dir = /opt/dovecot2/var/run/ default_login_user = dovecot disable_plaintext_auth = no first_valid_gid = 26 first_valid_uid = 26 log_path = /var/log/dovecot/dovecot.log login_greeting = Dovecot-2.0-sis ready. mail_attachment_dir = ~/mdbox/attachments mail_debug = yes mail_location = mdbox:~/mdbox mail_plugins = quota mail_privileged_group = mailnull passdb { args = /opt/dovecot2/etc/dovecot/dovecot-sql.conf driver = sql } plugin { mail_log_events = delete undelete expunge copy mailbox_delete mailbox_rename mail_log_fields = uid box msgid size } postmaster_address = postmaster@thisuglytest.name service imap-login { inet_listener imap { port = 143 } inet_listener imaps { port = 993 ssl = yes } service_count = 1 } service pop3-login { inet_listener pop3 { port = 110 } inet_listener pop3s { port = 995 } } ssl_cert = </etc/ssl/dovecot/cert.pem ssl_key = </etc/ssl/dovecot/key.pem userdb { args = /opt/dovecot2/etc/dovecot/dovecot-sql.conf driver = sql } protocol imap { imap_client_workarounds = delay-newmail tb-extra-mailbox-sep mail_plugins = quota } protocol pop3 { mail_plugins = quota pop3_client_workarounds = outlook-no-nuls oe-ns-eoh }
And my full doveconf output is at: http://bit.ly/c6vLNw
I am not sure what I am getting wrong, really.
Thanking everyone in advance.
-- Best regards, Odhiambo WASHINGTON, Nairobi,KE +254733744121/+254722743223
Damn!!
On Thu, 2010-10-21 at 19:42 +0300, Odhiambo Washington wrote:
Oct 21 16:33:18 lda: Error: userdb lookup: connect(/opt/dovecot2/var/run/auth-userdb) failed: Permission denied (euid=26(mailnull) egid=26(mailnull) missing +r perm: /opt/dovecot2/var/run/auth-userdb, euid is not dir owner)
It's not complaining about base_dir's permissions, but auth-userdb socket's permissions. See:
service auth {
auth_socket_path points to this userdb socket by default. It's typically
used by dovecot-lda, doveadm, possibly imap process, etc. Its default
permissions make it readable only by root, but you may need to relax these
permissions. Users that have access to this socket are able to get a list
of all usernames and get results of everyone's userdb lookups.
unix_listener auth-userdb { #mode = 0600 #user = #group = }
Maybe you want to set "user = vmail" or something.
On Thu, Oct 21, 2010 at 7:48 PM, Timo Sirainen <tss@iki.fi> wrote:
On Thu, 2010-10-21 at 19:42 +0300, Odhiambo Washington wrote:
Oct 21 16:33:18 lda: Error: userdb lookup: connect(/opt/dovecot2/var/run/auth-userdb) failed: Permission denied (euid=26(mailnull) egid=26(mailnull) missing +r perm: /opt/dovecot2/var/run/auth-userdb, euid is not dir owner)
It's not complaining about base_dir's permissions, but auth-userdb socket's permissions. See:
service auth {
auth_socket_path points to this userdb socket by default. It's typically
used by dovecot-lda, doveadm, possibly imap process, etc. Its default
permissions make it readable only by root, but you may need to relax
these
permissions. Users that have access to this socket are able to get a
list
of all usernames and get results of everyone's userdb lookups.
unix_listener auth-userdb { #mode = 0600 #user = #group = }
Maybe you want to set "user = vmail" or something.
Thanks Timo!
Problem solved.
-- Best regards, Odhiambo WASHINGTON, Nairobi,KE +254733744121/+254722743223
Damn!!
participants (2)
-
Odhiambo Washington
-
Timo Sirainen