Reset file and folder permissions of external hard drive data to default in Windows 7

44

28

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?

Noman

Posted 2013-10-14T16:29:03.817

Reputation: 543

@Colyn1337: Yes, the system is working as designed, but OP wants do circumvent it. Thus the question (which seems reasonable to me). – sleske – 2016-09-09T11:44:22.463

Similar question: Permissionless external drive with NTFS

– sleske – 2016-09-09T11:47:13.357

Are the systems joined to a domain, home group, or workgroup? To be honest, based on the way your question is framed now, the permissions system is working as designed. – Colyn1337 – 2013-10-14T17:52:54.830

Assuming only files are affected, try copy the affected files to Desktop, then create a new folder in the external hard disk, then copy files from desktop to it. If folder is affected, create the folder one level above. – PatricK – 2013-10-14T21:34:43.087

Answers

55

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"

Take ownership

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

Posted 2013-10-14T16:29:03.817

Reputation: 4 000

I received the same error as @aspirinemaga saying 'This operation is not allowed as it would create an un-usable ACL'. I was able to work around it by using sumit_singh's approach. – SolutionYogi – 2015-08-10T21:36:43.843

I used this cmd: "ICACLS * /reset /T" but the ownership were not affected. I'm already the owner btw. – Pedro77 – 2018-03-31T20:25:53.153

TAKEOWN should read TAKEOWN /F E: /R /D Y - can't edit as its < 6 chars - really SE? – Ryan – 2013-12-15T12:24:54.967

1Ryan - why the change? E:\ and E: are effectively the same; the first points to the drive, and the second to the root level of the drive. If you can explain, I will find a way to incorporate the edit. Other than that, you are correct; the "Y" is the prompt-response for the "/D" switch. – Debra – 2013-12-16T13:29:32.227

1Sorry yes, only need to remove / before Y – Ryan – 2013-12-16T14:12:30.903

2Your second command ICACLS "e:\" /reset /T is not working on my pc. Telling me This operation is not allowed as it would create an un-usable ACL. – aspirinemaga – 2013-12-19T11:01:18.890

Did you take ownership first? You can alternatively add your own account's permissions using ICACLS but, either way, you have to first take ownership. Note that, of course, you should modify the "e:" to match whatever drive or folder you are affecting on your own computer. This command would only fail with the error you cite if there is something wrong with the top-level ACL, as it merely says "change all ACLs below this to match the default inheritance." – Debra – 2013-12-26T04:50:48.123

8Instead of second command which is ICACLS "e:\" /reset /T, navigate to the desired directory using cd. Eg. cd /d E:. Once done run this command: ICACLS * /reset /T – sumit_singh – 2014-02-12T15:33:30.043

9

TAKEOWN /F E:\ /R /D Y

The command works fine.

ICACLS "E:\" /reset /T

The command did not work, but had to add an asterix (*) to it. As an example:

ICACLS "E:\*" /reset /T

For those who bumped in to the same problem as me.

user500012

Posted 2013-10-14T16:29:03.817

Reputation: 91

This seems like a comment and might not stand on its own as an answer. Can you provide more details? – bwDraco – 2015-09-21T21:17:52.620

Did you mean E:\* instead of E:*\? – DavidPostill – 2015-09-21T22:22:50.470

3

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) -

  1. Started my windows PC with the target hard disk connected that has the folder I want ownership to.
  2. Went to Control Panel.
  3. Opened Administrative Tools (it's under System & Security when viewing categories)
  4. Then clicked Computer Management (2nd from the top).
  5. Then open Local Users and Groups
  6. Inside that you will see two sub categorizations - Users, Groups. Open Users
  7. That should display 3+ Users. Top one will be Administrator. Right click it and select Properties
  8. Uncheck the "Account is Disabled" setting and then select ok.
  9. Then close all windows, and logoff / restart your windows.
  10. This time you should see a new user as the first one - Administrator, click it to login as Administrator to the computer.
  11. Now the real game begins.
  12. 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)
  13. 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).
  14. Now go to command prompt we opened in step 11 and type that drive letter e.g. F: and press enter
  15. 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
  16. 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

  1. 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

nitinr708

Posted 2013-10-14T16:29:03.817

Reputation: 131

actually believe or not, once I moved to win 10, i have the same issue, and your answer is well timed, i'll sure to check that out and brings my feedback. thanks – aspirinemaga – 2015-08-12T11:47:26.440

So, where's that feedback? :) – Jon – 2016-05-22T15:51:20.160

0

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.

Ryan

Posted 2013-10-14T16:29:03.817

Reputation: 153