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

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.


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.