Folder Permissions Issue in Windows 7

permissionswindows 7

In my machine (Windows 7 Ultimate installed): if I have user with name A who is also in administrators role and if I have a folder in D: drive that has been owned by user A and all other users all permissions are denied then when if I reformat C: drive and install Windows 7 ultimate again to C: drive but without touching other partitions of the same machine, create A user with same name again with administrators permission will I be able to use that protected folder in D: drive without needing to take owner ship or doing any changes to permissions dialog box.? (I am asking this because I have lot of folders with same situation. Might need to write script if any changes to permissions needed that way)

Best Answer

No, you will need to take ownership again. The username is irrelevant. Windows uses something called a Secure ID (or SID) to set permissions.

You can use the takeown command in an elevated command prompt that will take ownership of a folder and all its sub-folders, like so (source):

Taking ownership of a folder

Use the following syntax:

takeown /f <foldername> /r /d y

Then to assign the Administrators group Full Control Permissions for the folder, use this syntax:

icacls <foldername> /grant administrators:F /T

The /T parameter is added so that the operation is carried out through all the sub-directories and files within that folder.

Related Question