I was testing a batch file that used the following dos command rmdir test2 /s /q
, this command failed part way through and now I seem to have folders that have no permissions. For example, in the commandline I used DIR /Q
to see the owners of all folders in that directory most of them were "BUILTIN\Administrators", but the folder I'm having trouble with shows "...". I assume that means there is no owner. So even though I am a domain admin I can not view, delete, edit or modify the permissions on this folder. Does anyone have an idea of how to delete/edit this folder?
Asked
Active
Viewed 3,154 times
2
2 Answers
2
You can always "Take Ownership" of the folder and subfolders, at which point you should be able to manage the permissions (assuming that filesystem corruption isn't in play here). You can use the built-in commands below to take ownership and reset the permissions:
TAKEOWN /f "X:\test2" /r /d y
ICACLS "X:\test2" /reset /T

Evan Anderson
- 141,881
- 20
- 196
- 331
-
Hi Evan I tried your commands above, and get an Access is denied." Error, that seems to be the root of all my problems. – agilenoob Feb 02 '11 at 17:20
-
1Then try to log with a local administrator. If u get errors in security tab dont worry. U must go to ownership. – Carlos Garcia Feb 02 '11 at 17:24
-
Does not work for me. – djhurio Feb 16 '18 at 15:56
-
Can you offer-up some of the messages you might be seeing, or otherwise provide some more detail? This answer just turned 7 years old (happy birthday, answer!) but it should still work as it did in current versions of Windows. – Evan Anderson Feb 17 '18 at 00:11