Alan McGinlay - SICS
2013-Dec-05 20:18 UTC
[Dovecot] Dsync error: Couldn't drop privileges: getgrnam
Hi,
I upgraded (in place upgrade, preserving my dovecot configs) to a newer
release of ubuntu in order to gain access to slightly newer Dovecot
release and be able to use Dsync for migration from Cyrus, here is my
doveconf -n output:
# 2.1.7: /etc/dovecot/dovecot.conf
# OS: Linux 3.5.0-44-generic x86_64 Ubuntu 12.10
auth_debug = yes
auth_default_realm = whatever.com
auth_master_user_separator = *
auth_socket_path = /var/run/dovecot/auth-master
imapc_features = rfc822.size
imapc_host = oldmail.whatever.com
imapc_master_user = cyradmin
imapc_password = <password hidden>
mail_chroot = /var/vmail
mail_debug = yes
mail_gid = 5000
mail_location = maildir:~/Maildir
mail_prefetch_count = 20
mail_privileged_group = vmail
mail_uid = 5000
managesieve_notify_capability = mailto
managesieve_sieve_capability = fileinto reject envelope
encoded-character vacation subaddress comparator-i;ascii-numeric
relational regex imap4flags copy include variables body enotify
environment mailbox date ihave
passdb {
args = /etc/dovecot/master-users
driver = passwd-file
master = yes
}
passdb {
args = /etc/dovecot/dovecot-ldap.conf.ext
driver = ldap
}
plugin {
sieve = ~/.dovecot.sieve
sieve_dir = ~/sieve
}
protocols = " imap lmtp sieve pop3"
service auth-worker {
user = $default_internal_user
}
service auth {
unix_listener /var/spool/postfix/private/auth {
mode = 0666
}
unix_listener auth-userdb {
group = dovecot
mode = 0600
user = dovecot
}
}
service lmtp {
unix_listener /var/spool/postfix/private/dovecot-lmtp {
group = postfix
mode = 0600
user = postfix
}
}
service managesieve-login {
inet_listener sieve {
port = 4190
}
}
ssl_cert = <cert
ssl_key = <cert
userdb {
args = uid=vmail gid=vmail home=/domain/%1d/%d/%1n/%n
allow_all_users=yes
driver = static
}
protocol lmtp {
postmaster_address = post at whatever.com
}
protocol imap {
mail_max_userip_connections = 10
}
protocol pop3 {
pop3_uidl_format = %v.%u
}
And the command I am using to (attempt) a mailbox sync:
doveadm -o mail_fsync=never backup -R -u alantestuser at whatever.com
imapc:
Produces this output:
dsync(alantestuser at whatever.com): Error: user
alantestuser at whatever.com: Couldn't drop privileges: getgrnam(vmail)
failed: No such file or directory (in mail_privileged_group setting)
dsync(alantestuser at whatever.com): Fatal: User init failed
mail.log shows this:
Dec 5 21:10:54 newmailserver dovecot: auth: Debug: Loading modules
from directory: /usr/lib/dovecot/modules/auth
Dec 5 21:10:54 newmailserver dovecot: auth: Debug: Loading modules
from directory: /usr/lib/dovecot/modules/auth
Dec 5 21:10:54 newmailserver dovecot: auth: Debug: Module loaded:
/usr/lib/dovecot/modules/auth/libauthdb_ldap.so
Dec 5 21:10:54 newmailserver dovecot: auth: Debug: passwd-file
/etc/dovecot/master-users: Read 1 users in 0 secs
Dec 5 21:10:54 newmailserver dovecot: auth: Debug: master in:
USER#0111#011alantestuser at whatever.com#011service=doveadm
Dec 5 21:10:54 newmailserver dovecot: auth: Debug: master out:
USER#0111#011alantestuser at
whatever.com#011uid=5000#011gid=5000#011home=/domain/w/whatever.com/a/alantestuser
I followed this doc (which could use a little fleshing out, I will be
happy to do it once I get a grasp on this!):
http://wiki2.dovecot.org/Migration/Dsync
Thanks in advance!
/Alan
Timo Sirainen
2013-Dec-08 20:49 UTC
[Dovecot] Dsync error: Couldn't drop privileges: getgrnam
On 5.12.2013, at 22.18, Alan McGinlay - SICS <alanm at sics.se> wrote:> mail_privileged_group = vmail..> mail_location = maildir:~/Maildir..> dsync(alantestuser at whatever.com): Error: user alantestuser at whatever.com: Couldn't drop privileges: getgrnam(vmail) failed: No such file or directory (in mail_privileged_group setting)You don?t have vmail group in your system? Either create it or remove this setting. Most likely you want to remove it, since this setting was meant only for mbox format, while you?re using maildir.
Joseph Tam
2013-Dec-13 00:10 UTC
[Dovecot] Dsync error: Couldn't drop privileges: getgrnam
Alan McGinlay wrote:> Can't believe I'm the only one with this error, googled it and there is > nothing. Sorry to whine but I am getting desperate here!I googled "safe_mkstemp permission denied" and first hit is this thread dovecot.org/list/dovecot/2010-August/052319.html which mentions this error coming about from chrooting users. Looking back on your post, I see http://www.dovecot.org/list/dovecot/2013-December/093900.html mail_chroot = /var/vmail As long as your desperate, maybe try leaving this setting empty? (This doesn't explain why it's not deterministic though.) Try process traces -- I do when I'm stumped. Joseph Tam <jtam.home at gmail.com>
Maybe Matching Threads
- Ubuntu packages and broken link in docs
- dsync Error: Mailbox INBOX: Save commit failed: Mailbox was deleted under us
- Complete migration from Cyrus on remote server
- dsync mirror does not maintain changes between mailboxes
- basic dsync wrapper for migration from another server