Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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)

share|improve this question
up vote 1 down vote accepted

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.

share|improve this answer
@randolph-potter yes need to go with script,its logical and good behaviour that same user name creation again does not get permission to folders which might cause some security issues itself – DSharper Apr 4 '11 at 11:03

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .