Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a Windows 2003 Standard x64 Server with SP2.

After deleting a large number of folders from a folder, the OS is reporting "Access Denied" on any attempt to read or manipulate the folder. When examining the folder's properties, the Security tab is missing, only General and Customize are listed. We've tried a few things already.

  1. Rename folder, access denied.
  2. Delete folder, access denied.
  3. Take ownership of parent folder, and propagate permissions to children, access denied.
  4. Subinacl, access denied.
  5. Takeown (cmdline), access denied.

We are running chkdsk in read-only mode, and this has not completed yet. If possible we would like to solve this problem without rebooting or running a full chkdsk with the server offline.

Does anyone know a solution to this problem?

share|improve this question
If you can't claim ownership, and your account is a domain admin or enterprise admin account, then something is /very/ wrong with this picture... – Avery Payne Jun 26 '09 at 21:43
Yep, I wouldn't be asking if something wasn't very wrong :) – magnifico Jun 26 '09 at 22:12
I found that the above was correct. A user was holding the folder open, with a hung process. I used a tool called Hyena and disconnected the users session from the folder in question and this allowed me access. – user146986 Nov 26 '12 at 7:48
up vote 22 down vote accepted

When I've seen this it was because a process was holding the folder open but the folder was in the process of being deleted. Use a tool like Process Explorer to see if anything has an open handle on the folder. I would guess that once you release it or reboot, that folder will disappear.

share|improve this answer
Thanks, I found that System had a handle. When I deleted the handle, the folder vanished. It was empty anyway, so +1 for the win. – magnifico Jun 26 '09 at 21:46
This just solved an issue for me. Thanks Kevin! – Chris Thorpe Mar 26 '10 at 1:27
Worked fine for me too. Had the index service on the server cidaemon locking one file and preventing profile loading on the client. – André Schild Jan 31 '11 at 10:55
I'm an idiot; I can't believe I didn't think to check this. Thank you. – Owen Blacker Jan 11 '12 at 12:15
Thanks, this worked for me. It should be noted that the messages given in this case are misleading. Why don't you get the "this is being used by a program" instead of "access denied" when you try to delete or take ownership? – harpo Aug 16 '13 at 17:41

It sounds more like there is a file lock on the folder - probably some application has got it open. Try using a program like Unlocker - it should show you what app has got it locked and it can release the lock and then delete the file or folder for you.

share|improve this answer
+1 Thanks for the suggestion, I've used Unlocker before but in this case I wanted to avoid installing anything. – magnifico Jun 26 '09 at 22:11

I was in an identical situation - the backup/restore program we use (FDR/Upstream) had a lock on the folders - restarted it's service and it let go.

share|improve this answer

I had this same issue, and as in Kevin's situation, the file was being held open which it was being deleted. However, there was nothing in process explorer, unlocker failed, as did numerous other things I tried.

Turns out because the folder was shared it was being held open by another user and can be solved by going to Administrative Tools -> Computer Management -> Shared Folders -> Open Files and closing the relevant files or folders from in there. The folders then finished deleting automatically.

share|improve this answer

To delete files / folder locked by the system.

  1. Locate the folder c:\users\xxx
  2. Try to take ownership of the folder and subfolder : (it will probably failed)
  3. If not failing, give you full rights to the folders and subfolder and delete it.
  4. But since it’s failing, we need to find witch windows process lock the files.
  5. Start c:\cms\Microsoft SysInternal\procexp.exe
  6. Go to find, find handle
  7. Do a search c:\users\xxx
  8. Take not of the PID number that is locking the files (second column)
  9. Go back and Kill process or Kill process tree if it’s a tree.
  10. Go back to the folder and take the owner ship of the folder and subfolder c:\users\xxxx
  11. Give you full rights of the folder and subfolder c:\users\xxx
  12. Delete the c:\users\xxx folder
  13. Log back the user, he will have a fresh new profiles.

How to take owner ship and give you full rights of a folders and subfolders

  1. Locate your c:\users\xxx folder
  2. Right mouse on it | properties | Security | Advanced | Owner | Edit | Choose your ad account | Replace Owner on subcontainers and objects | Apply
  3. Go back to Permissions tab | change permissions | add your ad account | Full control | Replace all child object permissions with inheritable permissions from this object
  4. Now delete your c:\users\xxx folder.
share|improve this answer

I had this same problem and the only way I realized why I couldn't take ownership or even grant permissions was by using Process Explorer. It told me that AVG, my anti-virus, had a grasp on my entire E:\ Drive. Disabled the anti-virus, and voila! It works! Time to uninstall this trash.

share|improve this answer

Your Answer


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.