Skip to main content
added 41 characters in body
Source Link

From: https://learn.microsoft.com/en-us/answers/questions/497224/unable-to-display-current-owner

Here is the command sequence that I have used in the past to gain access to a folder where the permissions were locked down.

It will reset ownership to the Administrator group and set the permissions on the "Bad" folder and all subfolders and files to whatever permissions you have set on the parent "Test" folder.

You can save it as a .bat file or just paste the commands into an admin cmd prompt window.

set badfolder="C:\Test\Bad"
takeown /d Y /a /r /f %badfolder%
icacls %badfolder% /reset /t 
icacls %badfolder% /verify /t

Make sure to run in administrator cmd

From: https://learn.microsoft.com/en-us/answers/questions/497224/unable-to-display-current-owner

Here is the command sequence that I have used in the past to gain access to a folder where the permissions were locked down.

It will reset ownership to the Administrator group and set the permissions on the "Bad" folder and all subfolders and files to whatever permissions you have set on the parent "Test" folder.

You can save it as a .bat file or just paste the commands into an admin cmd prompt window.

set badfolder="C:\Test\Bad"
takeown /d Y /a /r /f %badfolder%
icacls %badfolder% /reset /t 
icacls %badfolder% /verify /t

From: https://learn.microsoft.com/en-us/answers/questions/497224/unable-to-display-current-owner

Here is the command sequence that I have used in the past to gain access to a folder where the permissions were locked down.

It will reset ownership to the Administrator group and set the permissions on the "Bad" folder and all subfolders and files to whatever permissions you have set on the parent "Test" folder.

You can save it as a .bat file or just paste the commands into an admin cmd prompt window.

set badfolder="C:\Test\Bad"
takeown /d Y /a /r /f %badfolder%
icacls %badfolder% /reset /t 
icacls %badfolder% /verify /t

Make sure to run in administrator cmd

Source Link

From: https://learn.microsoft.com/en-us/answers/questions/497224/unable-to-display-current-owner

Here is the command sequence that I have used in the past to gain access to a folder where the permissions were locked down.

It will reset ownership to the Administrator group and set the permissions on the "Bad" folder and all subfolders and files to whatever permissions you have set on the parent "Test" folder.

You can save it as a .bat file or just paste the commands into an admin cmd prompt window.

set badfolder="C:\Test\Bad"
takeown /d Y /a /r /f %badfolder%
icacls %badfolder% /reset /t 
icacls %badfolder% /verify /t