I'm running Windows XP Pro x64 SP2. I have a directory on an NTFS drive that was created by a Maven build. A subsequent build attempted to delete this directory and failed. I now get the error "Access is denied" whenever I try to do anything with that directory: change to it, delete it, rename it. This happens both in Windows Explorer and from a command prompt. The properties dialog in Windows Explorer doesn't even contain the Security tab.

I created the directory, so I don't think this is truly a permissions issue. I've occasionally had this error happen in the past is well. I believe the error is misleading, but the question is: what is the real problem and how do I fix it?

link|improve this question

36% accept rate
Similar issue i.e. possible solution here? superuser.com/questions/229563/… – glenneroo Jan 18 '11 at 13:41
feedback

4 Answers

up vote 3 down vote accepted

Another application (or the system) could have an open handle to that folder (or a file/folder it contains).

The easiest way to find these is the find handle function of Process Explorer.

link|improve this answer
Indeed. It turned out that explorer.exe itself had a handle open and when I closed that handle (in Process Explorer) the directory immediately disappeared (ie. I did not have to delete it again). – EMP May 17 '10 at 22:55
feedback

I've since experienced similar issues many times and the solution is usually to close all Windows Explorer windows. If that doesn't help then check in Process Explorer as per Richard's answer.

link|improve this answer
feedback

The fact that you don't have a "Security" tab might be because you're having "simple file sharing" enabled? Make sure that item is not checked in the folder options dialog:

alt text

link|improve this answer
Good thinking, but no. I do have a Security tab for other directories, just not that one. – EMP May 17 '10 at 7:10
feedback

If you have administrative rights on the computer, check the access rights to that directory (right click -> Security...). You may also check your permissions to the parent directory (you need write access tere, too).

If you don't have administrative rights, contact your administrator.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.