• Now's your chance win big! Join our community and get entered to win a RTX 2060 GPU, plus more! Join here.

    Pi Cast Episode 3 streams live on Tuesday, August 4th at 2:30 pm ET (7:30 PM BST). Watch live right here!

    Catch Scharon on the Tom's Hardware Show live on Thursday, August 6th at 2:00 pm ET (7:00 PM BST). Click here!

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

Apr 10, 2020
1
0
10
0
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:

USAFRet

Titan
Moderator
Mar 16, 2013
125,893
4,366
159,940
19,724
"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.
 
Reactions: Phillip Corcoran

ASK THE COMMUNITY