[SOLVED] Accidentally changed permissions and ownership on everything on my boot drive, is there any way to fix this?

Apr 10, 2020
1
0
10
I had around 400 or so .tmp folders in the root of my C drive and could only delete them by changing their permissions one-by-one. Getting annoyed at this, I looked up some solutions and ran a couple of commands in the command prompt. While I successfully deleted the files, I realized that I accidentally forgot to specify only changing permissions and ownership for the .tmp files, and instead changed everything in my boot drive that the command prompt could.

While I'm not too worried about this as I have good anti virus and I'm the only one that uses this computer, I would like to change everything back to default if possible. Is there any way to do this? I don't know the original permissions and ownership for everything so I can't do it manually.

Here were the commands I ran:

To change ownership of the files I used: takeown /f . /r /a /d y

To change the permissions I used: icacls *.tmp /grant everyone:F /t /q
 
Last edited:
Solution
Since we don't know the ownership of said files either the fix will be to reinstall everything all over again; beginning with Windows where you will format the drive as part of the process.

USAFRet

Titan
Moderator
"I looked up some solutions and ..."

The only way to revert is from the full drive backup you made before this happened.

There is no way to designate the original permissions of every single file or folder.
Some of those permissions are above the User or Admin.

Lacking a full drive backup or "possibly" a Restore Point...full wipe and reinstall.
 
  • Like
Reactions: Phillip Corcoran

TRENDING THREADS