directories not deleted when folder is

Ken Murchison ken at oceana.com
Mon Dec 20 10:13:01 EST 2004


Phil Chambers wrote:
> I have discovered that directories are often being left in the file system when a 
> user deletes the corresponding folder. cyrus.header, cyrus.index and cyrus.cache 
> and all message files are removed, but not the directory for the folder itself.
> 
> I can't say what percentage of the time this happens when users delete using there 
> e-mail client but I have just deleted 1581 user accounts using a perl script which 
> uses deletemailbox().  Of the 1581 the directories remained for 11.  In fact, the 
> whole directory structures remained for each user with all the files removed.
> 
> These accounts could not have been in use because the passwd entries for them were 
> removed a few weeks ago and imap authentication could not have worked.
> 
> Any ideas?

This can happen if the mailbox is open when the client tries to delete 
it because the Cyrus code does a chdir() to the mailbox directory when 
opening it.  Some OS don't like doing a rmdir() when the process is in 
the directory.

This is fixed in the 2.3 code, mainly because the mailbox metadata files 
can be split outside of the mailbox directory, so doing a chdir() 
doesn't make much sense in this case.

-- 
Kenneth Murchison     Oceana Matrix Ltd.
Software Engineer     21 Princeton Place
716-662-8973 x26      Orchard Park, NY 14127
--PGP Public Key--    http://www.oceana.com/~ken/ksm.pgp
---
Cyrus Home Page: http://asg.web.cmu.edu/cyrus
Cyrus Wiki/FAQ: http://cyruswiki.andrew.cmu.edu
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html




More information about the Info-cyrus mailing list