Quantcast
Channel: Understanding 'Access Denied' so that permissions can be reverted - icacls and takeown - Super User
Viewing all articles
Browse latest Browse all 2

Understanding 'Access Denied' so that permissions can be reverted - icacls and takeown

$
0
0
  • Before taking ownership of files and folders I would like to understand how to view the current permissions so that they may be reverted.
  • I am reciving an 'Access Denied' message to view or save permissions with elevated command prompt for location: C:\ProgramData\Microsoft\Windows\SystemData in Windows 10 enviroment.
  • It looks like that I may need to take ownership first, then can view the permissions, and use something like icacls 'reset' command to fix it afterwards.

If I try to view permissions:

C:\Windows\system32>icacls "C:\ProgramData\Microsoft\Windows\SystemData"C:\ProgramData\Microsoft\Windows\SystemData: Access is denied.Successfully processed 0 files; Failed processing 1 files

If I try to save an ACL file:

C:\Windows\system32>icacls C:\ProgramData\Microsoft\Windows\SystemData /save "C:\SystemData.acl" /tC:\ProgramData\Microsoft\Windows\SystemData: Access is denied.Successfully processed 0 files; Failed processing 1 files

In the answer to 'Understanding how to use Icals & Takeown' the owner of the folder was NT SERVICE\TrustedInstaller which may infact may be a standard in Windows 10, though I am only guessing.

Should I just use takeown, and icals, find out the permissions and then use the reset command.

takeown /f C:\ProgramData\Microsoft\Windows\SystemData /ricacls C:\ProgramData\Microsoft\Windows\SystemData /grant "%USERDOMAIN%\%USERNAME%":(F) /tMake Changesicacls C:\ProgramData\Microsoft\Windows\SystemData /setowner "NT SERVICE\TrustedInstaller" /ticacls C:\ProgramData\Microsoft\Windows\SystemData /reset /t

Likewise with the ACL, one would need to take ownership before creating, or is there a work around?

Reading:


Viewing all articles
Browse latest Browse all 2

Latest Images

Trending Articles





Latest Images