This can be achieved by taking ownership of the directory. Restricted folders are often owned by either “TrustedInstaller” or “System,” and even an administrator account is not allowed to modify those. However, if you get ownership of the directory, then you may do with it what you please. When trying to access these folders with an administrative account, you will probably come across the following prompt:
How to Take Folder Ownership using Security Tab How to Take Folder Ownership using Command Prompt Add “Take Ownership” to Context Menu Final Thoughts
As stated in the dialog box, clicking Continue will get you into the folder or permit you to make changes to it, but only if you are logged in using an administrative account. This is not always true, since granting access also depends upon what type of security the folder has. Some folders can be accessed like this, whilst some have stricter security and throw another prompt given below. That said, if you are logged in with a standard account, then clicking Continue will show you another similar prompt stating the following: In this case, there is no other option but to take ownership of the folder from the “Security” tab within the folder’s properties. However, even so, if using a standard account, you will need to provide the credentials of an administrative account while taking ownership of a folder, and the ownership rights will be assigned to that administrative account, and not the account you are logged in from. Therefore, it is recommended that you always take ownership of a folder while logged in from an administrative account. Now that this is clear, let us move on to show you different ways to take ownership of a folder.
How to Take Folder Ownership using Security Tab
One of the methods of taking ownership of an account is using File Explorer to open the folder properties and then use the Security tab to change its owner. Here are the complete steps to get the job done: Note: Taking ownership of restricted directories will grant you access and permission to manipulate its contents, but we suggest that you only do so if you know what you are doing. Any unauthorized changes can result in a fatality for the OS. Therefore, we recommend that you create a system restore point before moving forward. You should now be able to access and make changes to the folder to which previously you were unable to. Once the name is entered, click Check Names and it will automatically pick up the Distinguished Name (DN) of the account, which includes the computer name combined with the user account name. When done, click Ok. Alternatively, you can also enter a group, such as “everyone,” and make all members of that group the owners of this folder. Now repeat steps 1 & 2 from above to reopen the “Advanced security settings” window. Even though this process gets the job done, it is still a lengthy one. If you would rather achieve the same task much quicker, you can opt for the second method shared below.
How to Take Folder Ownership using Command Prompt
Taking ownership of a directory using the Command Prompt is relatively simpler than the process discussed above. Here is how: Note: This method changes the owner of a folder to the user account you are logged in from. As you can see above, the owner of the selected folder was immediately changed, and you should now be able to access and modify the restricted folder. Alternatively, you can assign the entire Administrative group as the owner of the directory as well as the subcontainers by adding the /A and /R switches. Here is an example:
Add “Take Ownership” to Context Menu
Another method to quickly take ownership of a folder, as well as the subcontainers and files inside of it, is by making a little tweak in the Windows Registry. Applying this tweak will add the option of “Take Ownership” in the context menu of a folder. Upon clicking this option, the user account you are logged in with will immediately get ownership privileges. Instead of manually making any changes, we have compiled a .REG file that will make all the necessary changes for you. Note: Misconfiguration of critical values in the system’s registry could be fatal for your operating system. Therefore, we insist that you create a system restore point before proceeding forward with the process. Click on the link below to add the “Take Ownership” option to the context menu: Add Take Ownership To Context Menu (806 bytes, 155 hits) Simply execute this file on your computer and proceed through with any UAC or confirmation prompts. If you want to remove the option in the future, download and execute the following .REG file: Remove Take Ownership From Context Menu (341 bytes, 125 hits)
Final Thoughts
With great power, comes great responsibilities. Taking ownership of a folder/directory will allow you to view its contents as well as make any changes to it. However, in the wrong hands, anyone else using your user account can also make unauthorized changes to it. Therefore, we emphasize that you only make the necessary changes and then revert the ownership. You can repeat the first method shared above (take ownership from folder properties) and change the owner back to its original.