I have an external hard drive, changed some security settings of files, and now I am not able to access them in my other system. I am an admin in this system. Is there any tool that can reset all of the security settings of all contents to default?
You can do this with the GUI -- take ownership and then reset everything --
Right click root folder > properties > security > advanced > owner (tab) > edit > choose your account from the list (or select from the Other Users or Groups button) and select "Replace Owner on subcontainers and objects"
There is also a "takeown" command, i.e. if the files are on a drive that you see as E: --
TAKEOWN /F E:\ /R /D Y
Once you have taken ownership, then you have to set the permissions; for this, you use ICACLS:
ICACLS "e:\" /reset /T
Alternative ways of changing the permissions with ICACLS can be found with "ICACLS /?" as you can explicitly add your permissions, replace, etc.
There is a nice tutorial with screenshots (including the one here) at http://www.askvg.com/guide-how-to-take-ownership-permission-of-a-file-or-folder-manually-in-windows/ although it shows you how to do the whole process from the GUI.
Debra gave the suggestion which worked very well for me... Many many thanks Debra! I wish I had the repo to vote up for your answer :)
Below is what my side of the story was and what I did to solve it..
My problem goes like this - I had Windows 7 Ultimate x86 installed on my dell studio earlier which developed some bad sectors over the years, and suddently the system started failing abruptly hence I replaced the hard disk with a new 500GB one and installed the same Windows 7 Ultimate x86 on the new one.
I did not take backup of my personal user files which I kept inside old documents or desktop as I thought using the Administrator account it could be done from the new HDD as we used to do in Windows XP.Well thats where I went wrong!!
WIndows 7 has some crancked up security inbuilt, which avoids any other guy to step inside your personal files just like that. Basically I couldn't access my old files when I connected the previous HDD. When I tried going into Users\Administrator or Users\MYUSER directory it just said - "Access is Denied" or went on showing the progress circle indicator for infitely long time and never actually opening it.
So I followed this amazing tutorial about how to change ownership and permissions in Windows 7 using GUI - http://www.blogsdna.com/2159/how-to-take-ownership-grant-permissions-to-access-files-folder-in-windows-7.htm
But it didn't work out for me as my permissions in old Windows also were pretty wasted. So I came to This article and it worked!
Following is what I did in (order of appearance) -
- Started my windows PC with the target hard disk connected that has the folder I want ownership to.
- Went to Control Panel.
- Opened Administrative Tools (it's under System & Security when viewing categories)
- Then clicked Computer Management (2nd from the top).
- Then open Local Users and Groups
- Inside that you will see two sub categorizations - Users, Groups. Open Users
- That should display 3+ Users. Top one will be Administrator. Right click it and select Properties
- Uncheck the "Account is Disabled" setting and then select ok.
- Then close all windows, and logoff / restart your windows.
- This time you should see a new user as the first one - Administrator, click it to login as Administrator to the computer.
- Now the real game begins.
- Click Start button and type cmd in the search box, when appeared right-click cmd and Run as Administrator (Elevated Command Prompt is what will get us there)
- Now go to My Computer and check the drive letter which is available as a mounted active partition in your windows, remember it's drive letter. e.g. 'F' (This is the partition which contains those Users directories which you want access to).
- Now go to command prompt we opened in step 11 and type that drive letter e.g. F: and press enter
- Then change directory to the parent directory of the folder you want full ownership to. e.g. If I want access to all files and directories inside "F:\Users\Administrator\" I would cd to F:\Users
- Now as mentioned by Debra run following commands -
F:\Users>TAKEOWN /F F:\Users\Administrator\ /R /D Y (all dirs under will be owned)
F:\Users>TAKEOWN /F F:\Users\Administrator* /R /D Y (any left over files will be owned too)
F:\Users>ICACLS "F:\Users\Administrator*" /reset /T
- One both the commands ran, I went to My Computer, opened the F: drive and successfully was able to browse inside the Users\Administrator directory and view, copy, cut or delete them to my destination.
Hope it saves your weekend!! NRJ
There is a problem with the other answers here. They assume that the base of the drive has the correct permissions already. I reinstalled Windows 10 and my applications could not access the already-created files and folders on the external drive. For example, Origin (a game distribution service like Steam) could not download and install its programs to the "Program Files" folder that I have on the external drive.
In order to discover what the default settings for an external drive are, I reformatted a USB drive. The correct settings are:
Everyone : Full control.
Set the base folder with those permissions and then let it apply them recursively to all the other folders. This will allow your programs to function correctly, but the permissions on the drive are insecure for sharing among different computers with different users on those computers. If you want them to be more accurate, you'll have to do some thinking and testing.