[Dovecot] Dovecot cannot unlink non-empty directory

Włodek Waligórski ratel at post.pl
Mon Sep 15 16:26:58 EEST 2008


Timo Sirainen pisze:

> What are those extra /.// in the middle of the path? Although I don't
> think it should matter. In any case this isn't normal.
>

The '/./' is used by some programs (like sftp-server) to chroot users to
their home directory. It is necessary for chroot to work.

>
> Some syscall fails with "Permission denied". Unfortunately
> unlink_directory() doesn't show which one. I thought it would always be
> obvious why it's failing..
> [...]
> You could strace the process to see which syscall exactly is failing:
> strace -p <imap process pid>

indeed, it fails on open()

--------------------------------------------------------------------------------
[...]
lstat64("/home/vpopmail/domains/laptop.aonet.pl/tescior/.//Maildir/.test12234",
{st_mode=S_IFDIR|0700, st_size=4096, ...}) = 0
rename("/home/vpopmail/domains/laptop.aonet.pl/tescior/.//Maildir/.test12234",
"/home/vpopmail/domains/laptop.aonet.pl/tescior/.//Maildir/..DOVECOT-TRASHED")
= -1 ENOTEMPTY (Directory not empty)
open(".", O_RDONLY|O_LARGEFILE)         = -1 EACCES (Permission denied)
write(2, "\1E3_unlink_directory(/home/vpopma"..., 124) = 124
[...]
--------------------------------------------------------------------------------
(the preceding "3_" on unlink_directory is my modification)

could '/./' cause this ?

-Włodek



More information about the dovecot mailing list