[Dovecot] Dsync error when working dir o-rwx
Hi,
I dont know why dsync requires o+rx in working dir, at least it could give better error message when working dir has o-rwx.
# cd # mkdir test # cd test # dsync -D -v -u 'info@example.org' -o 'mail_privileged_group=mail' -o 'mail_location=mbox:/email/info@example.org/mail:INBOX=/var/mail/info@example.org' mirror 'maildir:~/Maildir' dsync(info@example.org): Info: Sport: only in source dsync(info@example.org): Info: INBOX: only in source
# cd # mkdir test # chmod o-rwx test # cd test # dsync -D -v -u 'info@example.org' -o 'mail_privileged_group=mail' -o 'mail_location=mbox:/email/info@example.org/mail:INBOX=/var/mail/info@example.org' mirror 'maildir:~/Maildir' dsync(info@example.org): Info: Sport: only in source dsync(info@example.org): Info: INBOX: only in source dsync(info@example.org): Error: open(.) failed: Permission denied dsync(info@example.org): Error: open(.) failed: Permission denied dsync(info@example.org): Panic: file mbox-sync-rewrite.c: line 247 (mbox_sync_try_rewrite): assertion failed: (sync_ctx->mbox->mbox_lock_type == F_WRLCK) dsync(info@example.org): Error: Raw backtrace: /usr/lib/dovecot/libdovecot.so.0 [0x7f9fbc8489f2] -> /usr/lib/dovecot/libdovecot.so.0(default_fatal_handler+0x37) [0x7f9fbc848ae7] -> /usr/lib/dovecot/libdovecot.so.0(i_error+0) [0x7f9fbc848e03] -> /usr/lib/dovecot/libdovecot-storage.so.0(mbox_sync_try_rewrite+0x255) [0x7f9fbcb0c7b5] -> /usr/lib/dovecot/libdovecot-storage.so.0 [0x7f9fbcb1506a] -> /usr/lib/dovecot/libdovecot-storage.so.0 [0x7f9fbcb15a30] -> /usr/lib/dovecot/libdovecot-storage.so.0(mbox_sync+0x46) [0x7f9fbcb16846] -> /usr/lib/dovecot/libdovecot-storage.so.0 [0x7f9fbcb10701] -> dsync [0x410729] -> dsync(dsync_worker_update_mailbox+0x32) [0x40ee32] -> dsync(dsync_brain_sync+0xc6b) [0x40892b] -> dsync(dsync_brain_sync_all+0x18) [0x408d48] -> dsync(main+0x536) [0x4070a6] -> /lib/libc.so.6(__libc_start_main+0xe6) [0x7f9fbc0cd1a6] -> dsync [0x406989] Aborted
Kind Regards Jan Vítek
ČESKÝ WEBHOSTING s.r.o. Tel: +420 605 25 25 25 http://www.cweb.cz
On Sat, 2010-07-24 at 11:15 +0200, Jan Vítek wrote:
# dsync -D -v -u 'info@example.org' -o 'mail_privileged_group=mail' -o 'mail_location=mbox:/email/info@example.org/mail:INBOX=/var/mail/info@example.org' mirror 'maildir:~/Maildir' dsync(info@example.org): Info: Sport: only in source dsync(info@example.org): Info: INBOX: only in source dsync(info@example.org): Error: open(.) failed: Permission denied
The problem was mail_privileged_group. It wanted to chdir() and then fchdir() back to original directory. I fixed this by making dsync -u always chdir() to user's home directory first (it should have been doing that anyway).
dsync(info@example.org): Panic: file mbox-sync-rewrite.c: line 247 (mbox_sync_try_rewrite): assertion failed: (sync_ctx->mbox->mbox_lock_type == F_WRLCK)
Fixed also this crash.
participants (2)
-
Jan Vítek
-
Timo Sirainen