Taking ownership of a file
Taking ownership of a file
Open an elevated Command Prompt window. To do so, click Start, click All Programs, click Accessories, right-click Command Prompt, and then click Run as Administrator.
Type the following command and press ENTER:
TAKEOWN /F
(Replace the text
If the operation was successful, you should see the following message:
“SUCCESS: The file (or folder): “filename” 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
Taking ownership of a folder
Use the following syntax:
takeown /f
Then to assign the Administrators group Full Control Permissions for the folder, use this syntax:
icacls
The /T parameter is added so that the operation is carried out through all the sub-directories and files within that folder.
Command-line help: To know more information about the above commands, run these commands from a Command Prompt window.
takeown /?
icacls /?
Categorised as: Microsoft, Networking, Server OS
Leave a Reply
You must be logged in to post a comment.