Dovecot doesn't see user home dir

Bug #1543032 reported by QkiZ
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
dovecot (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Dovecot errors in log:
Feb 8 10:25:26 tesla dovecot: imap(<email address hidden>): Error: chdir(/home/vmail/example.com/user) failed: No such file or directory
Feb 8 10:25:26 tesla dovecot: imap(<email address hidden>): Debug: Effective uid=5000, gid=5000, home=/home/vmail/example.com/user, chroot=/var/tmp/vmail_chroot/
Feb 8 10:25:26 tesla dovecot: imap(<email address hidden>): Debug: Home dir not found: /home/vmail/example.com/user
Feb 8 10:25:26 tesla dovecot: imap(<email address hidden>): Debug: Namespace inbox: type=private, prefix=, sep=, inbox=no, hidden=no, list=yes, subscriptions=yes location=maildir:~/Maildir:LAYOUT=fs
Feb 8 10:25:26 tesla dovecot: imap(<email address hidden>): Debug: fs: root=/home/vmail/example.com/user/Maildir, index=, indexpvt=, control=, inbox=, alt=
Feb 8 10:25:26 tesla dovecot: imap(<email address hidden>): Debug: Namespace : /home/vmail/example.com/user/Maildir doesn't exist yet, using default permissions
Feb 8 10:25:26 tesla dovecot: imap(<email address hidden>): Debug: Namespace : Using permissions from /home/vmail/example.com/user/Maildir: mode=0700 gid=default
Feb 8 10:25:26 tesla dovecot: imap(<email address hidden>): Error: user <email address hidden>: Initialization failed: Namespace '': mkdir(/home/vmail/example.com/user/Maildir) failed: Permission denied (euid=5000(<getpwuid() error>) egid=50
00(<getgrgid() error>))
Feb 8 10:25:26 tesla dovecot: imap(<email address hidden>): Error: Invalid user settings. Refer to server log for more information.

Home dir /home/vmail/example.com/user exists and vmail user can cd to that directory. This error appears no matter what I permissions set, even on 777.

Dovecot config below:
# 2.2.9: /etc/dovecot/dovecot.conf
# OS: Linux 3.13.0-55-generic x86_64 Ubuntu 14.04.3 LTS
auth_debug = yes
auth_debug_passwords = yes
auth_mechanisms = login digest-md5 cram-md5
auth_verbose = yes
first_valid_gid = 5000
first_valid_uid = 5000
last_valid_gid = 5000
last_valid_uid = 5000
mail_chroot = /var/tmp/vmail_chroot/
mail_debug = yes
mail_home = /home/vmail/%d/%n
mail_location = maildir:~/Maildir:LAYOUT=fs
mailbox_list_index = yes
namespace inbox {
  location =
  mailbox Drafts {
    special_use = \Drafts
  }
  mailbox Junk {
    special_use = \Junk
  }
  mailbox Sent {
    special_use = \Sent
  }
  mailbox "Sent Messages" {
    special_use = \Sent
  }
  mailbox Trash {
    special_use = \Trash
  }
  prefix =
}
passdb {
  args = scheme=CRYPT username_format=%u /etc/dovecot/users
  driver = passwd-file
}
plugin {
  quota_rule = *:storage=100M
}
protocols = " imap lmtp pop3"
service auth-worker {
  user = $default_internal_user
}
service auth {
  unix_listener /var/spool/postfix/private/auth {
    group = postfix
    mode = 0666
    user = postfix
  }
}
service imap-login {
  inet_listener imap {
    port = 0
  }
  inet_listener imaps {
    port = 993
    ssl = yes
  }
}
service lmtp {
  unix_listener /var/spool/postfix/private/dovecot-lmtp {
    group = postfix
    mode = 0600
    user = postfix
  }
}
service pop3-login {
  inet_listener pop3 {
    port = 0
  }
  inet_listener pop3s {
    port = 995
    ssl = yes
  }
}
ssl_cert = </etc/ssl/certs/x.example.com.pem
ssl_key = </etc/ssl/private/example.com.key
ssl_protocols = !SSLv2 !SSLv3
userdb {
  args = username_format=%u /etc/dovecot/users
  driver = passwd-file
}

ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: dovecot-imapd 1:2.2.9-1ubuntu2.1
ProcVersionSignature: Ubuntu 3.13.0-55.94-generic 3.13.11-ckt20
Uname: Linux 3.13.0-55-generic x86_64
ApportVersion: 2.14.1-0ubuntu3.19
Architecture: amd64
Date: Mon Feb 8 10:26:45 2016
SourcePackage: dovecot
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
QkiZ (qkiz) wrote :
Revision history for this message
QkiZ (qkiz) wrote :

My mistake. Disabling mail_chroot option resolved problem.

Changed in dovecot (Ubuntu):
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.