I meant to use the TAKEOWN console command to get full permissions for a single folder in System32 that I meant to delete and replace with an older version but I only pasted the name up until that folder.

Now I can modify everything in System32. Will this be a problem in the future?

If so how can I change the permissions back (I'm not sure what they were)?

up vote 1 down vote accepted

Yes this will be a major problem. Also a major security concern.

The only clean way of reverting the change I can think of is to System Restore to the point before you made the change.

Another way which is not as clean but could be an option if you don't have a restore point is to use icacls.

First find an unaffected machine with the same version of OS and run icacls to save the permissions of the entire tree under C:\windows\system32\ :

icacls c:\windows\system32\ /save FreshWin32Permissions /T /C /Q

Then copy the file you created into affected machine (via network or USB key) and restore the permissions by running:

icacls c:\windows\system32\ /restore FreshWin32Permissions /T /C /Q

For more info on the method above please check this post: http://virot.eu/save-and-restore-ntfs-permissions-using-icacls/

This also reminds me of "I accidentally ...". I hope your post is not one of those jokes.

  • Thanks for the detailed answer. I should clarify something though, I haven't actually changed my permissions to edit those files, I have changed the ownership of those files to myself. So now I can edit properties -> Security to allow myself full access whereas before that option was greyed out. Sorry for not making it clear in the title post. There is only one folder, "inetsrv", to which I have modified permissions. But now I can modify it everywhere so I wonder if that would be a problem. – Stormtrooper Aug 10 at 9:13
  • The answer is still the same. It is still a major security concern because you as a standard user have ownership to system32 folder. Also you may run into issues if TrustedInstaller is not the owner of correct directories... The cleanest way is still to System Restore. icacls is still an option. Read above. – Art Gertner Aug 10 at 10:03

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.