I have a similar problem to that answered in This Question however, since I need to do this to a large number of directories and sub directories I was wondering if anyone knew of a way to cascade the permissions down from root to file levels. Thanks
2 Answers
Click on the start button and then type cmd
now right click on the cmd
appear in the list and run it as ADMIN using the option Run as Administrator. Or you can use the shortcut key after typing the cmd
press the Ctrl+Shift+Enter. Now typr the following command
takeown /f (foldername) /r /d y
If the operation was successful, you should see the following message:
SUCCESS: The file (or folder): "foldername" now owned by user "Computer Name\User name".
Then to assign the Administrators group Full Control Permissions for the file, you may use the ICACLS
command. 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.
For more help you can read this article for vista.
The command line programs takeown.exe
, icacls.exe
and cacls.exe
can do what you want. As you don't say exactly what you need to do the concrete command line parameters are difficult to forsee.
The following questions may also help you: