In a PowerShell script in Windows 10 Pro 64, I'm getting access-denied errors on several folders, such as:
I went to look at those folders in File Explorer. I never did get into them, but along the way, on three folders:
I got a message saying that I didn’t have permission to access them, but inviting me to click to get permission permanently. I clicked that. I’m now able to access those three folders like any other. In order to test what "permanently" meant, I rebooted. I'm still able to access those folders.
- Is it a security risk (or a bad idea for any other reason) to have those folders accessible? If so, how do I revert that permission?
- On the "RtBackup" folder, I got the same offer to give me permanent access, but when I clicked for that, the permission was denied and I was told that to get it I should go to the "Security" tab. Presumably that means of the folder properties. I'm thinking it might be a bad idea to mess around with security settings for a system folder. Is that right? What are the risks from doing that?
- In researching this, I came across the DOS command TakeOwn. I wonder if that might allow me to access all these elusive folders and maybe eliminate the access-denied errors in my PowerShell script. Would it? And would doing that be dangerous? What are the risks from running
TakeOwnon an inaccessible folder?