Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have a folder a 2003 member server which can't be deleted. Nothing has any permissions (domain admin and running up a cmd prompt as "nt authority\system" using psexec) - always "access denied".

When I do a dir /q, the owner shows as "...".

I've tried takeown.exe on the folder and also it's parent. The bad folder always reports "access denied". Also tried to reset using icacls, same thing.

Explorer permissions has no sharing & security options or tabs. It works fine for other folders, even in the same directory.

share|improve this question

4 Answers 4

up vote 8 down vote accepted

I've seen something similar to this. What ended up being the case is that the file was deleted while there were still outstanding locks on it. I couldn't do a darned thing to it. Clearing the outstanding locks caused the file to fully delete.

share|improve this answer
3  
+1 - Absolutely could be that, as well. The OP should run something like SysInternals "handle.exe" and grep the output for references to the "undeletable" directory. –  Evan Anderson Jun 9 '10 at 21:18
    
Just been back to check and run handle and it's now gone! Can only presume something was holding it, which has eventually closed and allowed the folder to delete. –  winnt93 Jun 9 '10 at 21:40

Had the same issue but no files had a lock on it, it just managed to lose all of it's owners.

Solution was to use TakeOwn

takeown /F dirname

Will take ownership of the file to the current user. Use /A after the dirname to assign it to the system administrator.

share|improve this answer

For deleting such files I first try unlocker. If that fails, or if there is some other operation I wish to perform on the file, I use my Bart PE disc.

share|improve this answer

I'd run CHKDSK on the volume before I did anything else. Are you seeing any messages in the System Event Log re: filesystem corruption (source "NTFS")?

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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