[Dovecot] dovecot-pgsql.conf can't find in chroot? (debian)
In my original email I noted that the directory /usr/local/etc was in the dovecot.conf variable valid_chroot_dirs :
valid_chroot_dirs = /usr/local/etc:/etc:/var/mail:/lib
Is that not sufficient? Under the /var/run/dovecot directory the directories ./usr/local/etc exist with dovecot-pgsql.conf in.
Is there some big RTFM item I'm missing here?
-Matthew
P.S. - email address changed due to problems with upstream, will jump back as soon as this is fixed so I can finish my migration :)
On Sat, 2005-03-05 at 09:06 +0100, Gunter Ohrner wrote:
Am Samstag, 5. März 2005 05:27 schrieb Matthew J. Harmon:
I have dovecot (+ssl) configured on debian in a chroot with ^^^^^^
I've never run dovecot chrooted, but...
The file exists, and permissions look good: root at alfa:~# ls -la /usr/local/etc/dovecot-pgsql.conf
...let me guess, you're not in the chroot here?
So, how should dovecot be able to find this file while it runs chrooted? You need to put all needed files into the chroot.
Yep, that's how it's with 0.99.x. With 1.0-tests however Dovecot opens the dovecot-pgsql.conf before chrooting.
Plagued with an error I can't get past: ==> dovecot_info.log <== dovecot: Mar 04 22:09:06 Info: Dovecot starting up ==> dovecot.log <== dovecot-auth: Mar 04 22:09:07 Fatal: Can't open configuration file /usr/local/etc/dovecot-pgsql.conf: No such file or directory dovecot: Mar 04 22:09:07 Error: child 18211 (auth) returned error 89 dovecot: Mar 04 22:09:07 Error: Auth process died too early - shutting down pop3-login: Mar 04 22:09:07 Fatal: fd_send(-1) failed: Broken pipe
I have dovecot (+ssl) configured on debian in a chroot with postfix+pgsql+sasl.
The file exists, and permissions look good: root at alfa:~# ls -la /usr/local/etc/dovecot-pgsql.conf lrwxrwxrwx 1 root dovecot 31 2005-03-04 20:35 /usr/local/etc/dovecot-pgsql.conf -> /etc/dovecot/dovecot-pgsql.conf root at alfa:~# ls -la /etc/dovecot/dovecot-pgsql.conf -rw-r--r-- 1 root dovecot 2875 2005-03-01 23:38 /etc/dovecot/dovecot-pgsql.conf
But... dovecot-auth can't see it? That's weird... root at alfa:~# strace -vffF /etc/init.d/dovecot start 1>& ~/dovecot.strace root at alfa:~# less ~/dovecot.strace [...] :/chroot [...] :/dovecot-pgsql.conf
[pid 18211] open("/var/log/dovecot_info.log",
O_WRONLY|O_APPEND|O_CREAT|O_LARGEFILE, 0666
[pid 18213] fcntl64(5, F_SETFD, FD_CLOEXEC
** chrooting dovecot-auth [pid 18211] chroot("/var/run/dovecot-auth") = 0 [pid 18211] chdir("/") = 0 [pid 18211] gettimeofday({1109995747, 798541}, {360, 0}) = 0 [pid 18211] rt_sigaction(SIGHUP, {0x404a07a0, [], SA_RESTORER, 0x4027e678}, NULL, 8) = 0 [pid 18211] rt_sigaction(SIGINT, {0x404a07a0, [INT], SA_RESTORER|SA_RESTART, 0x4027e678}, {SIG_DFL}, 8) = 0 [pid 18211] rt_sigaction(SIGTERM, {0x404a07a0, [TERM], SA_RESTORER|SA_RESTART, 0x4027e678}, {SIG_DFL}, 8) = 0 [pid 18211] rt_sigaction(SIGPIPE, {SIG_IGN}, {SIG_IGN}, 8) = 0
*** lets look at dovecot-pgsql.conf! [pid 18211] open("/usr/local/etc/dovecot-pgsql.conf", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory) [pid 18211] time(NULL) = 1109995747 [pid 18211] write(4, "dovecot-auth: Mar 04 22:09:07 Fa"..., 128) = 128 [pid 18211] munmap(0x40018000, 4096) = 0 [pid 18211] exit_group(89) = ? Process 18211 detached
Excerpts from /etc/dovecot/dovecot.conf: auth_userdb = pgsql /usr/local/etc/dovecot-pgsql.conf auth_passdb = pgsql /usr/local/etc/dovecot-pgsql.conf login_chroot = yes valid_chroot_dirs = /usr/local/etc:/etc:/var/mail:/lib auth_chroot = /var/run/dovecot-auth
Any recommended next steps?
Thanks a million!
-Matthew
participants (1)
-
Matthew J. Harmon