LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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 08-06-2012, 11:16 PM   #1
snowweb
Member
 
Registered: May 2008
Distribution: Ubuntu12, CentOS6
Posts: 61

Rep: Reputation: 0
Dovecot Permissions Issue (only the error message makes no sense)


I'm just setting up a fresh install of Dovecot on a clean new CentOS6.3 server.

I followed the documentation here, pretty damn closely.

When I issue the command "mutt -f imap://peter@localhost" from the same machine, I get the following:
Code:
Aug  7 11:50:18 BookkeeperNo1 dovecot: auth: Error: passwd-file /etc/dovecot/users: open(/etc/dovecot/users) failed: Permission denied (euid=97(dovecot) egid=97(dovecot) missing +r perm: /etc/dovecot/users, euid is not dir owner)                 
Aug  7 11:50:18 BookkeeperNo1 dovecot: master: Error: service(auth): command startup failed, throttling                                                     
Aug  7 11:50:18 BookkeeperNo1 dovecot: log: Error: service(auth): child 1890 returned error 89 (Fatal failure)
ls -la /etc/dovecot
Code:
drwxrwxrwx.  3 dovecot dovecot 4.0K Aug  6 21:12 .
drwxr-xr-x. 68 root    root    4.0K Aug  7 10:26 ..
drwxrwxrwx.  2 dovecot dovecot 4.0K Aug  7 11:43 conf.d
-rwxrwxrwx.  1 dovecot dovecot 3.5K Aug  6 21:12 dovecot.conf
-rwxrwxrwx.  1 dovecot dovecot   43 Aug  6 21:04 users
The permissions were originally more restrictive, but I relaxed them for diagnostic purposes, but it hasn't helped.

Output of "dovecot -n"
Code:
# OS: Linux 2.6.32-279.2.1.el6.x86_64 x86_64 CentOS release 6.3 (Final) ext4
disable_plaintext_auth = no
last_valid_gid = 1000
listen = *
mail_location = maildir:/var/mail/%n/Maildir
passdb {
  args = scheme=PLAIN username_format=%u /etc/dovecot/users
  driver = passwd-file
}
ssl = no
userdb {
  args = username_format=%u /etc/dovecot/users
  driver = passwd-file
}
verbose_proctitle = yes
Output of "cat /etc/passwd | grep peter"
Code:
peter:x:500:500::/home/peter:/bin/bash
Output of "cat /etc/passwd | grep dove"
Code:
dovecot:x:97:97:Dovecot IMAP server:/usr/libexec/dovecot:/sbin/nologin
dovenull:x:498:497:Dovecot's unauthorized user:/usr/libexec/dovecot:/sbin/nologin
Output of "cat /etc/group | grep 500"
Code:
people:x:500:
Output of "cat /etc/group | grep 97"
Code:
dovecot:x:97:
dovenull:x:497:
Contents of "/etc/dovecot/users"
Code:
peter:{PLAIN}testpass:500:500::/home/peter
Output of "telnet 127.0.0.1 143"
Code:
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
* OK Waiting for authentication process to respond..
* BYE Disconnected for inactivity.
Connection closed by foreign host.
When I restart Dovecot, this is the /var/log/maillog entry:
Code:
Aug  7 12:06:58 BookkeeperNo1 dovecot: master: Warning: Killed with signal 15 (by pid=1942 uid=0 code=kill)
Aug  7 12:06:59 BookkeeperNo1 dovecot: master: Dovecot v2.0.9 starting up (core dumps disabled)
When I do the above telnet command, this is the /var/log/maillog entry:
Code:
Aug  7 12:08:56 BookkeeperNo1 dovecot: auth: Error: passwd-file /etc/dovecot/users: open(/etc/dovecot/users) failed: Permission denied (euid=97(dovecot) egid=97(dovecot) missing +r perm: /etc/dovecot/users, euid is not dir owner)
Aug  7 12:08:56 BookkeeperNo1 dovecot: master: Error: service(auth): command startup failed, throttling
Aug  7 12:08:56 BookkeeperNo1 dovecot: log: Error: service(auth): child 1959 returned error 89 (Fatal failure)
Aug  7 12:09:31 BookkeeperNo1 dovecot: imap-login: Error: Timeout waiting for handshake from auth server. my pid=1958, input bytes=0
Aug  7 12:09:56 BookkeeperNo1 dovecot: auth: Error: passwd-file /etc/dovecot/users: open(/etc/dovecot/users) failed: Permission denied (euid=97(dovecot) egid=97(dovecot) missing +r perm: /etc/dovecot/users, euid is not dir owner)
Aug  7 12:09:56 BookkeeperNo1 dovecot: master: Error: service(auth): command startup failed, throttling
Aug  7 12:09:56 BookkeeperNo1 dovecot: log: Error: service(auth): child 1960 returned error 89 (Fatal failure)
Aug  7 12:10:26 BookkeeperNo1 dovecot: imap-login: Error: Timeout waiting for handshake from auth server. my pid=1958, input bytes=0                                                   
Aug  7 12:10:56 BookkeeperNo1 dovecot: imap-login: Error: Timeout waiting for handshake from auth server. my pid=1958, input bytes=0                                                   
Aug  7 12:10:56 BookkeeperNo1 dovecot: auth: Error: passwd-file /etc/dovecot/users: open(/etc/dovecot/users) failed: Permission denied (euid=97(dovecot) egid=97(dovecot) missing +r perm: /etc/dovecot/users, euid is not dir owner)               
Aug  7 12:10:56 BookkeeperNo1 dovecot: master: Error: service(auth): command startup failed, throttling                   
Aug  7 12:10:56 BookkeeperNo1 dovecot: log: Error: service(auth): child 1961 returned error 89 (Fatal failure)            
Aug  7 12:11:31 BookkeeperNo1 dovecot: imap-login: Error: Timeout waiting for handshake from auth server. my pid=1958, input bytes=0       
Aug  7 12:11:56 BookkeeperNo1 dovecot: imap-login: Disconnected: Inactivity (no auth attempts): rip=127.0.0.1, lip=127.0.0.1, secured      
Aug  7 12:11:56 BookkeeperNo1 dovecot: auth: Error: passwd-file /etc/dovecot/users: open(/etc/dovecot/users) failed: Permission denied (euid=97(dovecot) egid=97(dovecot) missing +r perm: /etc/dovecot/users, euid is not dir owner)
Aug  7 12:11:56 BookkeeperNo1 dovecot: master: Error: service(auth): command startup failed, throttling
Aug  7 12:11:56 BookkeeperNo1 dovecot: log: Error: service(auth): child 1962 returned error 89 (Fatal failure)
The above is only from that one telnet command, which takes a few minutes to fail completely.

I'm about out of ideas on this. I've been trying to set-up Dovecot now since Saturday, so any help would be very much appreciated.

Kindest regards,

Peter
 
Old 08-07-2012, 04:54 AM   #2
snowweb
Member
 
Registered: May 2008
Distribution: Ubuntu12, CentOS6
Posts: 61

Original Poster
Rep: Reputation: 0
I've solved this now. The poor Dovecot documentation omits to mention that you need to disable SELinux in order for it to work (or maybe find some way to exclude dovecot form SELinux).

I disabled SELinux and restarted the server and it immediately worked :-)
 
Old 08-07-2012, 05:04 AM   #3
snowweb
Member
 
Registered: May 2008
Distribution: Ubuntu12, CentOS6
Posts: 61

Original Poster
Rep: Reputation: 0
I've found the answer to my question about SELinux here.

Last edited by snowweb; 08-07-2012 at 05:05 AM.
 
  


Reply

Tags
auth, dovecot, permissions



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
After upgraded to 6.0.4, free -m makes no sense raindog308 Debian 1 03-05-2012 12:33 PM
postfix dovecot mysql permissions issue gnetcon Linux - Software 4 08-03-2006 11:05 AM
kernel: st0: Error with sense data: Current st09:00: sense key N da_kidd_er Linux - Hardware 0 12-16-2004 10:51 PM
Sound problem (makes no sense) carlosinfl Fedora 6 07-20-2004 06:40 PM
umask makes no sense shanenin Linux - Software 3 10-31-2003 02:58 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 07:59 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration