Understanding 'Access Denied' so that permissions can be reverted - icacls and takeownHow would I use Takeown...

Is there any common country to visit for uk and schengen visa?

Why is participating in the European Parliamentary elections used as a threat?

Was World War I a war of liberals against authoritarians?

Why are there no stars visible in cislunar space?

What (if any) is the reason to buy in small local stores?

How can I create URL shortcuts/redirects for task/diff IDs in Phabricator?

pipe commands inside find -exec?

Why is this tree refusing to shed its dead leaves?

Why is "la Gestapo" feminine?

Jem'Hadar, something strange about their life expectancy

Do people actually use the word "kaputt" in conversation?

Did Nintendo change its mind about 68000 SNES?

Do I need an EFI partition for each 18.04 ubuntu I have on my HD?

How do you justify more code being written by following clean code practices?

Is "inadequate referencing" a euphemism for plagiarism?

PTIJ: Which Dr. Seuss books should one obtain?

Emojional cryptic crossword

CLI: Get information Ubuntu releases

What is the tangent at a sharp point on a curve?

What is 露わになる affecting in the following sentence, '才能の持ち主' (持ち主 to be specific) or '才能'?

Is xar preinstalled on macOS?

Why do I have a large white artefact on the rendered image?

What is the difference between something being completely legal and being completely decriminalized?

Fair way to split coins



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


How would I use Takeown to take ownership of all folders on one drive?Setting Deny Permissions with ICACLS on “This Folder”Create List of Access Denied Files & FoldersUnderstanding how to use Icals & Takeown to make changes and reset in Windows 10TrustedInstaller Preventing Deletion of Files/FoldersUnable to delete or take ownership of folder (Windows 7)Can I revert changes from the TAKEOWN and ICACLS commands?Howto remove Windows 7n MachineKeys restored to alternate location?Setting Deny Permissions with ICACLS on “This Folder”“Unable to Display Current Owner” & Access Denied when trying to take ownershipAccess denied on a directory (my own): So locked down that everything fails from icacls to takeownWindows 7 ProgramData permission denied despite being adminCannot gain access to second drive (SSD)Understanding how to use Icals & Takeown to make changes and reset in Windows 10













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:ProgramDataMicrosoftWindowsSystemData in Windows 10 enviroment.

  • It looks like that I may need to take ownership first, then can view the permissions.




If I try to save an ACL file:



C:Windowssystem32>icacls C:ProgramDataMicrosoftWindowsSystemData /save "C:SystemData.acl" /t
C:ProgramDataMicrosoftWindowsSystemData: Access is denied.
Successfully processed 0 files; Failed processing 1 files


If I try to view permissions:



C:Windowssystem32>icacls "C:ProgramDataMicrosoftWindowsSystemData"
C:ProgramDataMicrosoftWindowsSystemData: 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 SERVICETrustedInstaller which may infact may be a standard in Windows 10, though I am only guessing.



I do not know the owner to reset to with out taking ownership first:



takeown /f C:ProgramDataMicrosoftWindowsSystemData /r
icacls C:ProgramDataMicrosoftWindowsSystemData /grant "%USERDOMAIN%%USERNAME%":(F) /t
Make Changes
icacls C:ProgramDataMicrosoftWindowsSystemData /setowner "??" /t
icacls C:ProgramDataMicrosoftWindowsSystemData /remove:g "%USERDOMAIN%%USERNAME%":(F) /t


In the answer to 'Understanding how to use Icals & Takeown' once taking ownership of folder, I see that the prior owner is still listed, so I may not need to know the permissions before taking ownership also, but just revert it to the second listed (F) owner.



C:WindowsWeb %USERDOMAIN%%USERNAME%:(F)
NT SERVICETrustedInstaller:(F) (REVERT TO THIS)
NT SERVICETrustedInstaller:(CI)(IO)(F)
NT AUTHORITYSYSTEM:(M)
...


Likewise the alternative method for saving out an ACL in the anwser to 'Understanding how to use Icals & Takeown' I see that you would need to take ownership of folder and files before saving out an ACL so would have to revert permissions afterwards? This is a bit messed up but something like this?



takeown /f C:ProgramDataMicrosoftWindowsSystemData /r    
icacls C:ProgramDataMicrosoftWindowsSystemData /save "C:SystemData.acl" /t
icacls C:ProgramDataMicrosoftWindowsSystemData /grant "%USERDOMAIN%%USERNAME%":(F) /t
Make Changes
icacls C:ProgramDataMicrosoftWindows /restore "C:SystemData.acl"
icacls C:ProgramDataMicrosoftWindowsSystemData /setowner "??" /t


Reading:



Understanding how to use Icals & Takeown to make changes and reset in Windows 10



Create List of Access Denied Files & Folders



Setting Deny Permissions with ICACLS on “This Folder”



SU - Is there a way in which I can use takeown to apply ownership to every directory on the drive?



SU - Takeown grant permission



SS46 - Takeown



SS64 - Icacls









share



























    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:ProgramDataMicrosoftWindowsSystemData in Windows 10 enviroment.

    • It looks like that I may need to take ownership first, then can view the permissions.




    If I try to save an ACL file:



    C:Windowssystem32>icacls C:ProgramDataMicrosoftWindowsSystemData /save "C:SystemData.acl" /t
    C:ProgramDataMicrosoftWindowsSystemData: Access is denied.
    Successfully processed 0 files; Failed processing 1 files


    If I try to view permissions:



    C:Windowssystem32>icacls "C:ProgramDataMicrosoftWindowsSystemData"
    C:ProgramDataMicrosoftWindowsSystemData: 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 SERVICETrustedInstaller which may infact may be a standard in Windows 10, though I am only guessing.



    I do not know the owner to reset to with out taking ownership first:



    takeown /f C:ProgramDataMicrosoftWindowsSystemData /r
    icacls C:ProgramDataMicrosoftWindowsSystemData /grant "%USERDOMAIN%%USERNAME%":(F) /t
    Make Changes
    icacls C:ProgramDataMicrosoftWindowsSystemData /setowner "??" /t
    icacls C:ProgramDataMicrosoftWindowsSystemData /remove:g "%USERDOMAIN%%USERNAME%":(F) /t


    In the answer to 'Understanding how to use Icals & Takeown' once taking ownership of folder, I see that the prior owner is still listed, so I may not need to know the permissions before taking ownership also, but just revert it to the second listed (F) owner.



    C:WindowsWeb %USERDOMAIN%%USERNAME%:(F)
    NT SERVICETrustedInstaller:(F) (REVERT TO THIS)
    NT SERVICETrustedInstaller:(CI)(IO)(F)
    NT AUTHORITYSYSTEM:(M)
    ...


    Likewise the alternative method for saving out an ACL in the anwser to 'Understanding how to use Icals & Takeown' I see that you would need to take ownership of folder and files before saving out an ACL so would have to revert permissions afterwards? This is a bit messed up but something like this?



    takeown /f C:ProgramDataMicrosoftWindowsSystemData /r    
    icacls C:ProgramDataMicrosoftWindowsSystemData /save "C:SystemData.acl" /t
    icacls C:ProgramDataMicrosoftWindowsSystemData /grant "%USERDOMAIN%%USERNAME%":(F) /t
    Make Changes
    icacls C:ProgramDataMicrosoftWindows /restore "C:SystemData.acl"
    icacls C:ProgramDataMicrosoftWindowsSystemData /setowner "??" /t


    Reading:



    Understanding how to use Icals & Takeown to make changes and reset in Windows 10



    Create List of Access Denied Files & Folders



    Setting Deny Permissions with ICACLS on “This Folder”



    SU - Is there a way in which I can use takeown to apply ownership to every directory on the drive?



    SU - Takeown grant permission



    SS46 - Takeown



    SS64 - Icacls









    share

























      0












      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:ProgramDataMicrosoftWindowsSystemData in Windows 10 enviroment.

      • It looks like that I may need to take ownership first, then can view the permissions.




      If I try to save an ACL file:



      C:Windowssystem32>icacls C:ProgramDataMicrosoftWindowsSystemData /save "C:SystemData.acl" /t
      C:ProgramDataMicrosoftWindowsSystemData: Access is denied.
      Successfully processed 0 files; Failed processing 1 files


      If I try to view permissions:



      C:Windowssystem32>icacls "C:ProgramDataMicrosoftWindowsSystemData"
      C:ProgramDataMicrosoftWindowsSystemData: 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 SERVICETrustedInstaller which may infact may be a standard in Windows 10, though I am only guessing.



      I do not know the owner to reset to with out taking ownership first:



      takeown /f C:ProgramDataMicrosoftWindowsSystemData /r
      icacls C:ProgramDataMicrosoftWindowsSystemData /grant "%USERDOMAIN%%USERNAME%":(F) /t
      Make Changes
      icacls C:ProgramDataMicrosoftWindowsSystemData /setowner "??" /t
      icacls C:ProgramDataMicrosoftWindowsSystemData /remove:g "%USERDOMAIN%%USERNAME%":(F) /t


      In the answer to 'Understanding how to use Icals & Takeown' once taking ownership of folder, I see that the prior owner is still listed, so I may not need to know the permissions before taking ownership also, but just revert it to the second listed (F) owner.



      C:WindowsWeb %USERDOMAIN%%USERNAME%:(F)
      NT SERVICETrustedInstaller:(F) (REVERT TO THIS)
      NT SERVICETrustedInstaller:(CI)(IO)(F)
      NT AUTHORITYSYSTEM:(M)
      ...


      Likewise the alternative method for saving out an ACL in the anwser to 'Understanding how to use Icals & Takeown' I see that you would need to take ownership of folder and files before saving out an ACL so would have to revert permissions afterwards? This is a bit messed up but something like this?



      takeown /f C:ProgramDataMicrosoftWindowsSystemData /r    
      icacls C:ProgramDataMicrosoftWindowsSystemData /save "C:SystemData.acl" /t
      icacls C:ProgramDataMicrosoftWindowsSystemData /grant "%USERDOMAIN%%USERNAME%":(F) /t
      Make Changes
      icacls C:ProgramDataMicrosoftWindows /restore "C:SystemData.acl"
      icacls C:ProgramDataMicrosoftWindowsSystemData /setowner "??" /t


      Reading:



      Understanding how to use Icals & Takeown to make changes and reset in Windows 10



      Create List of Access Denied Files & Folders



      Setting Deny Permissions with ICACLS on “This Folder”



      SU - Is there a way in which I can use takeown to apply ownership to every directory on the drive?



      SU - Takeown grant permission



      SS46 - Takeown



      SS64 - Icacls









      share
















      • 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:ProgramDataMicrosoftWindowsSystemData in Windows 10 enviroment.

      • It looks like that I may need to take ownership first, then can view the permissions.




      If I try to save an ACL file:



      C:Windowssystem32>icacls C:ProgramDataMicrosoftWindowsSystemData /save "C:SystemData.acl" /t
      C:ProgramDataMicrosoftWindowsSystemData: Access is denied.
      Successfully processed 0 files; Failed processing 1 files


      If I try to view permissions:



      C:Windowssystem32>icacls "C:ProgramDataMicrosoftWindowsSystemData"
      C:ProgramDataMicrosoftWindowsSystemData: 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 SERVICETrustedInstaller which may infact may be a standard in Windows 10, though I am only guessing.



      I do not know the owner to reset to with out taking ownership first:



      takeown /f C:ProgramDataMicrosoftWindowsSystemData /r
      icacls C:ProgramDataMicrosoftWindowsSystemData /grant "%USERDOMAIN%%USERNAME%":(F) /t
      Make Changes
      icacls C:ProgramDataMicrosoftWindowsSystemData /setowner "??" /t
      icacls C:ProgramDataMicrosoftWindowsSystemData /remove:g "%USERDOMAIN%%USERNAME%":(F) /t


      In the answer to 'Understanding how to use Icals & Takeown' once taking ownership of folder, I see that the prior owner is still listed, so I may not need to know the permissions before taking ownership also, but just revert it to the second listed (F) owner.



      C:WindowsWeb %USERDOMAIN%%USERNAME%:(F)
      NT SERVICETrustedInstaller:(F) (REVERT TO THIS)
      NT SERVICETrustedInstaller:(CI)(IO)(F)
      NT AUTHORITYSYSTEM:(M)
      ...


      Likewise the alternative method for saving out an ACL in the anwser to 'Understanding how to use Icals & Takeown' I see that you would need to take ownership of folder and files before saving out an ACL so would have to revert permissions afterwards? This is a bit messed up but something like this?



      takeown /f C:ProgramDataMicrosoftWindowsSystemData /r    
      icacls C:ProgramDataMicrosoftWindowsSystemData /save "C:SystemData.acl" /t
      icacls C:ProgramDataMicrosoftWindowsSystemData /grant "%USERDOMAIN%%USERNAME%":(F) /t
      Make Changes
      icacls C:ProgramDataMicrosoftWindows /restore "C:SystemData.acl"
      icacls C:ProgramDataMicrosoftWindowsSystemData /setowner "??" /t


      Reading:



      Understanding how to use Icals & Takeown to make changes and reset in Windows 10



      Create List of Access Denied Files & Folders



      Setting Deny Permissions with ICACLS on “This Folder”



      SU - Is there a way in which I can use takeown to apply ownership to every directory on the drive?



      SU - Takeown grant permission



      SS46 - Takeown



      SS64 - Icacls







      windows windows-10 permissions file-permissions icacls





      share












      share










      share



      share










      asked 5 mins ago









      Kass MonkKass Monk

      326




      326






















          0






          active

          oldest

          votes











          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "3"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1415188%2funderstanding-access-denied-so-that-permissions-can-be-reverted-icacls-and-t%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes
















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Super User!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1415188%2funderstanding-access-denied-so-that-permissions-can-be-reverted-icacls-and-t%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Couldn't open a raw socket. Error: Permission denied (13) (nmap)Is it possible to run networking commands...

          VNC viewer RFB protocol error: bad desktop size 0x0I Cannot Type the Key 'd' (lowercase) in VNC Viewer...

          Why not use the yoke to control yaw, as well as pitch and roll? Announcing the arrival of...