Bug 3872 - Mono cannot delete a file which should be writable
Summary: Mono cannot delete a file which should be writable
Status: NEW
Alias: None
Product: Class Libraries
Classification: Mono
Component: mscorlib (show other bugs)
Version: unspecified
Hardware: PC Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
Depends on:
Blocks: 2999
  Show dependency tree
Reported: 2012-03-13 11:24 UTC by Alan McGovern
Modified: 2012-03-13 11:24 UTC (History)
1 user (show)

See Also:
Is this bug a regression?: ---
Last known good build:


Description Alan McGovern 2012-03-13 11:24:19 UTC
If a file is writable by the current user but is readonly for group or world, then  System.IO.File.Delete cannot delete the file.

This scenario can be reproduced by running "chmod -w" on a file and then running the following code:

FileInfo fileInfo = new FileInfo (path);
fileInfo.Attributes &= ~FileAttributes.ReadOnly;

Note You need to log in before you can comment on or make changes to this bug.