Fix: Restore All File Permissions to Default in Windows 7 After Taking Ownership of ‘Everything’

You were somewhere along the lines of “Hey, I own this system, so why not really show it who the boss it?” and “Admin? Pfft., I want to be Godmin.” when you just decided to select the Windows and/or Program Files and/or Program Files (x86) directory and take ownership of all its contents.

Take Ownership

After the process—which is quite long—ended, you were happy that you’re not Godmin, not a mere normie “Admin”. You were happy, life was delightful, oxygen felt like gaseous nitrous oxide because of just how God damned happy you were.

But suddenly, then, you realized that a lot—and by that, I mean a lot—of programs stopped running they way they used to. Some would crash randomly, some wouldn’t save data as they were saving before, your internet networks’ passwords won’t save, etc.

Now, this is because for some applications to function properly in Windows, a particular set of read/write permissions are required to be assigned by Windows itself to particular entities of the operating system. And when you mess that up, Windows smash.

Anyway, wrote way too much as an intro. I’m here to save your Godmin butt, and here’s my guide to restoring everything back to normal without a boring System Restore.

Method 1: Using the simple command generating tool [Automatic]

Step 1: Download the tool required

You’re going to need a simple and little tool that makes and executes specific commands in the command prompt according to the options you select. 

You can download this tool from here.

After the download is complete, extract the .RAR file anywhere you like and you’ll now have the “RestorePermission.exe” application there.

Step 2: Run the tool

Restoring.png

Run the “RestorePermission.exe” file you just extracted and you’ll see a window like this:

Choose the folder you want to reset the file permissions of, and then let the default options be selected, which are “Reset files permissions”, “Apply for all sub directories”, and “Don’t follow links”. On top of that, also select “Reset hidden and system files” too, if it is not already selected for you in the default configuration.

You’ll now see that the options and folder that you select do nothing more than just make a command prompt command in the text box below the options. And when you press “GO”, it only runs those commands in a command prompt window.

If you still do not trust the tool, just type the same command in a command prompt window you have opened yourself and hit Enter. Then you won’t have to click on “GO” and lose your computer to a covert fraternity of talking monkey pirates as you’re thinking.

NOTE: If you’re wondering what the ‘icacls’ in the command is, it is a command-line utility that can be used to modify NTFS file system permissions in Windows Server 2003 SP2, Windows Server 2008, Windows Vista and Windows 7. This ‘icacls’ is what is being used here in the above command made by the tool.

Step 3: Wait for the restoration

Let Windows do its thing, you’ll see lots of files’ permissions being changed and the command prompt’s rapid scrolling making you feel like you’re the God of hackers, but chill, grab something to drink, and let it complete. You’ll know when it is done.

After it’s done, pat yourself on the back and smile, you’ve done it. Now, please don’t do the “Take ownership from futile machine” thing again. You don’t need to own your system, you need to own others’. *insert fsociety GIF here later*

Method 2: Using commands [Manual]

Step 1: Open a command prompt window

You chose this step because you’re paranoid dude or the hax0r terminal loving dude, either one. Anyway, not much to explain here, open a command prompt window by pressing the Windows + R keys and typing “CMD” in the “Run” box. Hit Enter and you’ll have a command prompt window in front of you.

Step 2: HammerHacker time

First select the folder you need to restore the permissions of.

Then enter the commands below (the second one after the first command is fully executed), replacing “FOLDERPATH” with the folder path of your folder: 

icacls FOLDERPATH* /T /L /Q /C /RESET
This magic spell restores the permissions for the folder specified
attrib /s -h -s FOLDERPATH*
This magic spell restores the hidden and system files' attributes to default
/T: Indicates that this operation is performed on all sub-directories under the directory entered

/L: Indicates that this operation is performed on a symbolic link itself versus its target

/Q: Indicates that success messages should be suppressed

/C: Indicates that this operation will continue on all file errors. Error messages will still be displayed

Example: If I am looking to restore the permissions for the “Windows” directory, I’ll use the following commands:

icacls C:\Windows\* /T /L /Q /C /RESET
attrib /s -h -s C:\Windows\

NOTE: If you’re wondering what the ‘icacls’ in the command is, it is a command-line utility that can be used to modify NTFS file system permissions in Windows Server 2003 SP2, Windows Server 2008, Windows Vista and Windows 7. This ‘icacls’ is what is being used here in the above command made by the tool.

Step 3: Wait for the restoration

Let Windows do its thing, you’ll see lots of files’ permissions being changed and the command prompt’s rapid scrolling making you feel like you’re the God of hackers, but chill, grab something to drink, and let it complete. You’ll know when it is done.

After it’s done, pat yourself on the back and smile, you’ve done it. Now, please don’t do the “Take ownership from futile machine” thing again. You don’t need to own your system, you need to own others’. *insert fsociety GIF here later*

And yes, I was lazy, so copied and pasted the same 2 paragraphs I had written for the automatic method.

14 comments

  1. Hi, Can you please help me, why do I get ‘Invalid parameter’ and ‘Parameter format not correct’ messages? Here is the copy of CMD:

    Microsoft Windows [Version 6.1.7601]
    Copyright (c) 2009 Microsoft Corporation. All rights reserved.

    C:\Windows\system32>H:

    H:>icacls H:\Applications* /T /L /Q /C /RESET
    Successfully processed 37 files; Failed processing 0 files

    H:>icacls H:\Games Archive* /T /L /Q /C /RESET
    Invalid parameter “Archive*”

    H:>attrib /s -h -s H:\System Volume Information\
    Parameter format not correct –

    H:>icacls H:\Games Archive\ /T /L /Q /C /RESET
    Invalid parameter “Archive\”

    H:>icacls H:\Games_Archive* /T /L /Q /C /RESET
    H:\Games_Archive*: The system cannot find the path specified.
    Successfully processed 0 files; Failed processing 1 files

    H:>

    Like

    1. Hey!

      We believe this might be due to the space in the directory name. As you may see, the message says:

      Invalid parameter “Archive*”
      … while the full directory name is “Games Archive”.

      In order to mitigate this, we use quotes to explicitly tell the Command Prompt that the space is included within the directory name itself. This can be done by trying the same command manually, with the path to the directory put within quotes this time, such as:

      icacls “H:\Games Archive*” /T /L /Q /C /RESET

      Try this and let us know if it fixes the issue!

      Like

  2. Great! I’ve followed the paranoid method for getting Program Files into some sort of order. Now I wonder if the same command line can be used on the entire C: partition which I attempted to take ownership of with a program called Permissions Time Machine and regretted immediately. Would it run on C:**

    Like

    1. Ah, I too had set out on a perilous quest of admin-ing literally everything on my system drive; which then landed me in a mess that made me search for this tool and try it out. It worked for me! Turns it the tool knows all the default permissions for Windows-related files and directories, which is the majority of the default C: drive. So, go ahead!

      Like

  3. I see a lot of “Invalid Handle” and “Access denied” messages.

    I WISh there was a way to COMPLETELY DESTROY all this crazy permissions shh*t. It’s for a HOME PC, where NO ONE ELSE works on, except me.

    Like

    1. What up, Mike!

      I know, right? Permissions related shit is just a mess, I have never completely properly understood the workings of it, hahah! Coming to the issue, following the guide properly regardless of the error messages you are shown should do the job. Did you follow through completely? Ignore those errors and check if your initial issue has solved after the tool’s use.

      Do update!

      Like

  4. I think other site proprietors should take this website as an model, very clean and great user genial style and design, let alone the content. You’re an expert in this topic!

    Like

  5. Simply want to say your article is as astounding. The clearness on your submit is just spectacular
    and that i could assume you’re knowledgeable on this subject.
    Fine together with your permission allow me to clutch your feed to stay up to date
    with forthcoming post. Thanks 1,000,000 and please continue the enjoyable work.

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.