emerglines Posted October 9, 2013 Share Posted October 9, 2013 (edited) If you must access a file or a folder that you do not have rights to, you must first take ownership of that file or folder. When you do this, you replace the security permissions that were originally created for the file or folder.To do this via Command Prompt you can use the “takeown” command.A simple example would be:takeown /f test.txt - which would take ownership of the file test.txt as the current userIn the example below – takeown /f * /r /d y – I have navigated into the parent folder TestFolder to take owner ship of all files and folders (including sub-directories) as the current user, and have specified that I would like to take ownership when prompted.You should get a message of success for each object this is carried out upon.There are several useful arguments which can be used with the “takeown” command as demonstrated above./s <Computer> – Specifies the hostname or IP address of a remote computer (do not use backslashes). The default value is the local computer. This parameter applies to all of the files and folders specified in the command./u [<Domain>]<User name> – Runs the script with the permissions of the specified user account. The default value is system permissions./p [<Password>] – Specifies the password of the user account that is specified in the /u parameter./f <File name> – Specifies the file name or directory name pattern. You can use the wildcard character * when specifying the pattern. You can also use the syntax ShareNameFileName./a – Gives ownership to the Administrators group instead of the current user./r – Performs a recursive operation on all files in the specified directory and subdirectories./d {Y | N} – Suppresses the confirmation prompt that is displayed when the current user does not have the “List Folder” permission on a specified directory, and instead uses the specified default value.Y: Take ownership of the directory.N: Skip the directory.Note that you must use this option in conjunction with the /r option.Note: no risk using this command its fully safe.Difficulty : easy Edited October 9, 2013 by emerglines Quote Link to comment Share on other sites More sharing options...
sanjoa Posted October 9, 2013 Share Posted October 9, 2013 Nice tut! Thanks +1 Quote Link to comment Share on other sites More sharing options...
emerglines Posted October 9, 2013 Author Share Posted October 9, 2013 Nice tut! Thanks +1These are the most unknown tutorial that can make you fix your windows without need to reinstall or backup :) Quote Link to comment Share on other sites More sharing options...
Bl4ckCyb3rEnigm4 Posted November 3, 2021 Share Posted November 3, 2021 @vefiyo This is considered a "thank you post". Thank you post has been removed. Please read the guidelines before posting. https://nsaneforums.com/guidelines/ Quote Like on most online forums the use of the 'Like / Thanks' button is preferred over simply posting 'Thanks' or something similar. Making an excessive amount of posts which add little to nothing to a topic might result in a post count reduction. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.