Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

From my postfix setup I'm running deliver as nobody:nobody and it can't connect to auth-worker socket of dovecot. Thats my dovecot config:


# 2.0.13: /etc/dovecot/dovecot.conf
# OS: Linux 2.6.32-lts x86_64  
auth_mechanisms = plain login
auth_username_format = %Lu
disable_plaintext_auth = no
first_valid_gid = 65534
mail_location = maildir:/var/spool/vmail/%d/%u/
mail_privileged_group = postfix

passdb {
  args = /etc/dovecot/dovecot-sql.conf
  driver = sql
}
protocols = imap pop3

service auth {
  user = nobody

  unix_listener login/auth-master {
    mode = 0666
  }
  unix_listener login/auth {
    group = postfix
    user = postfix
    mode = 0660
  }
}
ssl = no
userdb {
  args = /etc/dovecot/dovecot-sql.conf
  driver = sql
}
verbose_proctitle = yes
protocol imap {
  imap_client_workarounds = delay-newmail tb-extra-mailbox-sep
}
protocol pop3 {
  pop3_client_workarounds = outlook-no-nuls oe-ns-eoh
  pop3_uidl_format = %08Xu%08Xv
}
protocol lda {
  postmaster_address = postmaster@mydomain.com
  sendmail_path = /usr/sbin/sendmail
}

Thats what I have in the logs:


Aug  5 10:10:21 localhost dovecot: lda: Error: userdb lookup: connect(/var/run/dovecot/auth-userdb) failed: Permission denied (euid=99(nobody) egid=99(nobody) missing +r perm: /var/run/dovecot/auth-userdb, euid is not dir owner)
Aug  5 10:10:21 localhost dovecot: lda: Fatal: Internal error occurred. Refer to server log for more information.

I've tried to do


unix_listener auth-worker {
  user = nobody
}

in service auth section, but dovecot fails to run with this message: doveconf: Fatal: Error in configuration file /etc/dovecot/dovecot.conf: duplicate listener: /var/run/dovecot/auth-worker

How do I fix this issue?

Thanks.

share|improve this question
    
ls -l /var/run/dovecot/auth-userdb? –  quanta Aug 5 '11 at 8:28
    
srw------- 1 root root 0 авг. 5 10:06 /var/run/dovecot/auth-userdb doing unix_listener auth-userdb { user = nobody } helps, but then auth-worker has root owner and delivery fails again :( –  Daniel Aug 5 '11 at 8:39

2 Answers 2

According to error message you have wrong owner for /var/run/dovecot/ directory. Fix that and be happy.

share|improve this answer
    
forget the directory, it has nothing to do with the issue. changing socket permissions with chmod/chown solves the problem. –  Daniel Aug 5 '11 at 8:20

Issue with auth-userdb permissions and ownership is solved like this:


service auth {
  unix_listener auth-userdb {
    mode = 0660 # socket access mode
    user = nobody # set uid to nobody
    group = nobody # set gid to nobody
  }
}

Problem with auth-worker permissions and ownership was much trickier and I've found out how to solve it only after reading sources of dovecot. Maybe there are some pages describing this issue, but I didn't find any. As I've found out auth-worker is a service and its socket permission may be set like this:


service auth-worker {
  unix_listener auth-worker {
    user = nobody # same as above, mode and group are supported too
  }
}
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.