0

I'm getting in my syslog the following warning

27 16:53:54 h2004156 dovecot: imap-login: Login: user=<test@domain.com>, method=PLAIN, rip=89.16.141.57, lip=85.214.254.164, mpid=14496, TLS
Jan 27 16:53:54 h2004156 dovecot: imap(test@domain.com): Error: chdir(/var/vmail/user/test/) failed: Permission denied (euid=5000(vmail) egid=5000(vmail) missing +x perm: /var/vmail, dir owned by 150:8 mode=0770) 

previously I have been adding vmail group and user but doesn't seems to work

fefe
  • 357
  • 1
  • 8
  • 18

2 Answers2

2

The message is telling you exactly what the problem is: Dovecot (running under uid&gid 5000) doesn't have execute (search) permission on the /var/vmail directory. It's even telling you what the owner, group, and mode of the problematic directory is! Did you change the permissions of this directory recently? Was the group ID of that directory supposed to be 5000 (instead of 8) or perhaps was the mode supposed to be 0771 (instead of 0770)?

Celada
  • 6,200
  • 1
  • 21
  • 17
  • I have been deleting user and group and recreating theme groupadd -g 5000 vmail useradd -u 5000 -d /var/vmail -s /usr/sbin/nologin -g vmail vmailchown vmail:vmail /var/vmail -Rf chmod 700 /var/vmail – fefe Jan 27 '13 at 16:59
  • I have been installing ispconfig3 on ubuntu 12.04 I even run an update on this but I can get right permissions – fefe Jan 27 '13 at 19:38
0

Had the same issue.

  1. Open the the log file /var/log/dovecot/imap.log
  2. Find UID & GID in error message (which is 150:8 in your message) dir owned by 150:8 mode=0770
  3. Edit /etc/dovecot/dovecot.conf
  4. Change these options:

mail_uid = 150 mail_gid = 8 first_valid_uid = 150 last_valid_uid = 150

  1. Save edits
  2. Restart dovecot service systemctl restart dovecot

Also the correct permission for mail directory is 0700, just in case for security.