LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 04-27-2011, 09:42 AM   #1
deathclaw
LQ Newbie
 
Registered: Apr 2011
Posts: 2

Rep: Reputation: 0
dovecot-lda/postfix permission issues


I'm sooo exausted after two days of fooling with this.

The problem:
Apr 27 17:29:21 mxkasib dovecot: lda: Error: userdb lookup: connect(/var/run/dovecot/auth-userdb) failed: Permission denied (euid=8(mail) egid=12(mail) missing +w perm: /var/run/dovecot/auth-userdb, euid is not dir owner)

Obviously, dovecot-lda, instanced by postfix, couldn't access the auth-userdb file because of permission. There are plenty of topics over the internet, the problem is really simple. Except for I've got all the permissions needed, or it seems to me so and I'm missing something. Here is some additional information:

[root@mxkasib conf.d]# dovecot -n
# 2.0.11: /etc/dovecot/dovecot.conf
# OS: Linux 2.6.18-238.9.1.el5 x86_64 CentOS release 5.6 (Final) ext3
listen = *
mail_location = maildir:/var/spool/mail/%n:INDEX=/var/spool/mail/.indexes/%n
mbox_write_locks = fcntl
passdb {
args = scheme=PLAIN username_format=%u /etc/dovecot/users
driver = passwd-file
}
protocols = pop3
service auth {
unix_listener auth-userdb {
group = mail
mode = 0666
user = mail
}
user = mail
}
service pop3-login {
inet_listener pop3 {
port = 110
}
}
ssl_cert = </etc/pki/dovecot/certs/dovecot.pem
ssl_key = </etc/pki/dovecot/private/dovecot.pem
userdb {
args = username_format=%u /etc/dovecot/users
driver = passwd-file
}

[root@mxkasib conf.d]# cat /etc/postfix/master.cf |tail -n 3
dovecot unix - n n - - pipe
flags=DRhu user=mail:mail argv=/usr/libexec/dovecot/dovecot-lda -f ${sender} -d ${recipient}

[root@mxkasib conf.d]# ls -l /var/run/dovecot/
srw------- 1 root root 0 Апр 27 17:29 anvil
srw------- 1 root root 0 Апр 27 17:29 anvil-auth-penalty
srw------- 1 root root 0 Апр 27 17:29 auth-client
srw------- 1 dovecot root 0 Апр 27 17:29 auth-login
srw------- 1 root root 0 Апр 27 17:29 auth-master
srw-rw-rw- 1 mail mail 0 Апр 27 17:29 auth-userdb
srw------- 1 dovecot root 0 Апр 27 17:29 auth-worker
srw------- 1 root root 0 Апр 27 17:29 config
srw------- 1 root root 0 Апр 27 17:29 dict
srw------- 1 root root 0 Апр 27 17:29 director-admin
srw------- 1 root root 0 Апр 27 17:29 director-userdb
srw-rw-rw- 1 root root 0 Апр 27 17:29 dns-client
srw------- 1 root root 0 Апр 27 17:29 doveadm-server
drwxr-xr-x 2 root root 4096 Мар 17 18:00 empty
srw-rw-rw- 1 root root 0 Апр 27 15:31 lmtp
drwxr-x--- 2 root dovenull 4096 Апр 27 17:29 login
-rw------- 1 root root 5 Апр 27 17:29 master.pid

Apparently, I've given all the permissions I could imagine. It's even devil 666, and it still complains. Please, mayday, cause I ran off with any possible ideas. Thanks in advance.
 
Old 04-27-2011, 11:15 AM   #2
jadrevenge
Member
 
Registered: Mar 2011
Location: Manchester,UK
Distribution: OpenIndiana/Ubuntu
Posts: 36

Rep: Reputation: 2
it could be permissions on the directory /var/run/dovecot, rather than on that specific file ... especially if it is trying to create a lock file before reading/writing.

no guarantees though.
 
Old 04-28-2011, 07:42 AM   #3
deathclaw
LQ Newbie
 
Registered: Apr 2011
Posts: 2

Original Poster
Rep: Reputation: 0
I gave up. It seems, that there is some kind of misunderstanding between dovecot 2.* and postfix 2.3 in these terms, cause the former is to 'young' and the latter is to 'old'. I'm not going to upgrade postfix, so I downgraded dovecot, and facing different kind of problems, but anyways, the topic is closed.
 
Old 06-22-2012, 12:56 PM   #4
maliroc
LQ Newbie
 
Registered: Jun 2012
Posts: 2

Rep: Reputation: Disabled
mysql-dovecot-relay-error

Original error
tail -f /var/vmail/dovecot-delivery.log
lda: Error: userdb lookup: connect(/var/run/dovecot/auth-userdb) failed: Permission denied (euid=5000(vmail) egid=5000(vmail) missing +r perm: /var/run/dovecot/auth-userdb, euid is not dir owner)

tail -f /var/log/mail.log
Jun 22 07:22:28 cataflam postfix/master[865]: daemon started -- version 2.8.5, configuration /etc/postfix
Jun 22 07:22:28 cataflam postfix/qmgr[872]: AC306A166C: from=<root@cataflam.maliroc.lan>, size=347, nrcpt=1 (queue active)
Jun 22 07:22:29 cataflam postfix/pipe[897]: AC306A166C: to=<fbar@maliroc.lan>, relay=dovecot, delay=109498, delays=109498/0.27/0/0.39, dsn=4.3.0, status=deferred (temporary failure)

Solution
Hi all was getting the same errors took me 2 days to understand what it was saying to me but i finally solved it



if you do an ls -l /var/run/dovecot/auth-userdb you will seet that root is the owner and the premissions are srw-------- so vmail has not right to call or even use the

process
What i did was a chown -R vmail:vmail /var/run/dovecot/auth-userdb
I also did a chmod g+r /var/run/dovecot/auth-userdb
ls -l /var/run/dovecot/auth-userdb
srw----r-- 1 vmail vmail
my unix_listener auth-userdb {
mode = 600
{

protocol lda {
auth_socket_path = /var/run/dovecot/auth-userdb
log_path = /home/vmail/dovecot-deliver.log

that worked for me
1. havent restarted the dovecot service dont know if it will keep the settings.

tail -f /var/log/mail.log
Jun 22 08:32:28 cataflam postfix/qmgr[872]: AC306A166C: from=<root@cataflam.maliroc.lan>, size=347, nrcpt=1 (queue active)
Jun 22 08:32:28 cataflam postfix/pipe[2481]: AC306A166C: to=<fbar@maliroc.lan>, relay=dovecot, delay=113698, delays=113698/0.17/0/0.39, dsn=2.0.0, status=sent (delivered via

dovecot service)
Jun 22 08:32:28 cataflam postfix/qmgr[872]: AC306A166C: removed
Jun 22 08:50:45 cataflam dovecot: auth: mysql(127.0.0.1): Connected to database mailstore



tail -f /var/vmail/dovecot-deliver.log
Jun 22 07:37:11 lda(fbar@maliroc.lan): Info: msgid=<20120622123710.CCD44A23D3@cataflam.maliroc.lan>: saved mail to INBOX
Jun 22 07:50:06 lda(fbar@maliroc.lan): Info: msgid=unspecified: saved mail to INBOX
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] postfix/dovecot issues daled Linux - Server 9 08-24-2010 08:22 PM
Postfix Dovecot Permission issue? cnapagoda Linux - Newbie 1 05-28-2010 11:11 AM
[SOLVED] Dovecot & Postfix SASL Issues tomehb Linux - Server 2 03-20-2010 02:57 PM
postfix used dovecot lda problem xiutuo Linux - Server 1 11-12-2009 08:58 PM
Postfix Dovecot send receive issues areamike Linux - Server 9 04-09-2009 08:19 AM


All times are GMT -5. The time now is 03:40 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration