[Dovecot] Dovecot cannot unlink non-empty directory

Timo Sirainen tss at iki.fi
Sun Sep 14 20:54:16 EEST 2008


On Sun, 2008-09-14 at 16:28 +0200, Włodek Waligórski wrote:
> HOW TO REPRODUCE
> 1. Create a fresh new account
> 2. Login to a new account and create folder say 'TestFolder'
> 3. When I try to delete TestFolder - it is deleted and ..DOVECOT-TRASHED
> appears in user's Maildir AND
> 
> Error: IMAP(test at laptop.aonet.pl):
> unlink_directory(/home/vpopmail/domains/laptop.aonet.pl/test/.//Maildir/..DOVECOT-TRASHED)
> failed: Permission denied

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.

> I. Yes, the file permissions are fine - all are writeable to (mail_uid =
>  vpopmail)

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..

> II. The problem is - dovecot cannot unlink non-empty directory, I
> artificially deleted contents of ..DOVECOT-TRASHED and dovecot allowed
> folder deletion from client. After that situation was like in point 4.

unlink_directory() recursively goes through all files and directories,
unlinking the files and rmdiring the directories.

You could strace the process to see which syscall exactly is failing:
strace -p <imap process pid>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
Url : http://dovecot.org/pipermail/dovecot/attachments/20080914/4d6214cc/attachment.bin 


More information about the dovecot mailing list