Windows – Why can’t I delete a folder that I have ownership (+ children) AND full control permissions (+ children) on

ntfspermissionswindows

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.

Best Answer

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.