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've got some leftover Windows update temporary folders (they have GUID-ish names) on the root of the system drive. I'm trying to clean these up, but am getting the following behavior upon deletion request through Windows Explorer:

  1. "You'll need to provide administrator permission to delete this folder"
  2. Click
  3. "You need permission to perform this action" + "You require permission from \ to make changes to this file"

I have taken ownership of the folder, along with all its child items, and I have full control permissions on the folder, and all its child items.

Every other thread on this issue says that you need to take ownership and add full control permissions to yourself, but this obviously has not done the trick.

Asked differently: Why do I need permission from myself to perform this file operation?

FWIW, using the "Unlocker" tool works around the problem, but I'm interested in getting to the root cause, rather than hacking it.

share|improve this question
    
What version of Windows NT are you using? –  JdeBP Jan 31 '12 at 13:31
    
99% chance you have a locked file. Run Process Explorer to find the offending process and kill the file handle. –  John Homer Jan 10 '13 at 20:44

2 Answers 2

FWIW, using the "Unlocker" tool works around the problem

This hints that there are locked files in those folders. That means that there was an active process with an open handle to something in there. A file with an open handle can't be deleted. Usually, if you can't track down what's causing this, a reboot will kill any stray processes that might not have released those files.

This doesn't sound like it really has anything to do with file permissions, but Windows does give you a generic Access Denied message when attempting to modify a locked file.

share|improve this answer
    
Excellent -- I'll grab Sysinternals Process Explorer or handle.exe and see if anything has a file handle open in that folder. I should have thought of that, thanks. –  Trevor Sullivan Jan 30 '12 at 16:29
    
Ok, so I ran handle.exe > c:\handle.txt, used Notepad2 to search the log for one of the folder names, and it can't find anything. So, no dice, sorry. –  Trevor Sullivan Jan 30 '12 at 16:30
    
Use the search feature in Process Explorer. Make sure you run it elevated (Run as administrator) or it won't see all the open file handles. –  John Homer Jan 10 '13 at 20:43

I had this exact issue on files hosted on a Windows 2008 R2 file server. I tried several of the fixes listed here (as well as from other sites), but none worked. In most cases, I received permission denied messages when I attempted my fix. On a whim, I looked at the open files on the server in question. The user who originally reported the problem had the files open on their PC, but had since totally closed all file applications (Word, Acrobat and Excel in this case).

According to the File Server's Open Files list (Server Computer Management > System Tools > Shared Folders > Open Files, many of the files that were in the folders to be deleted that were causing the errors were still open by that user.

I performed a force close by selecting the files, right clicking and selecting "Close Open File", then we were able to delete the folders with no more issues.

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.