On Sun, 2008-09-14 at 16:28 +0200, Włodek Waligórski wrote:
HOW TO REPRODUCE
- Create a fresh new account
- Login to a new account and create folder say 'TestFolder'
- When I try to delete TestFolder - it is deleted and ..DOVECOT-TRASHED appears in user's Maildir AND
Error: IMAP(test@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>