Windows 10: Change Owner of File, Folder, Drive, or Registry Key in Windows 10  

Page 1 of 7 123 ... LastLast
    Change Owner of File, Folder, Drive, or Registry Key in Windows 10

    Change Owner of File, Folder, Drive, or Registry Key in Windows 10

    How to Change Owner of File, Folder, Drive, or Registry Key in Windows 10
    Published by Category: Security System
    10 Jul 2017
    Designer Media Ltd

    Published by


    Brink's Avatar
    Administrator

    Posts: 22,304

    Show Printable Version 


    How to Change Owner of File, Folder, Drive, or Registry Key in Windows 10

    information   Information
    An owner is assigned to an object when that object is created. By default, the owner is the creator of the object. No matter what permissions are set on an object, the owner of the object can always change the permissions.

    The owner of an object (ex: file, folder, drive, or registry key) has the right to allow or deny access to that resource. Although members of the Administrators group and other authorized users also have the right to allow or deny access, the owner has the authority to lock out non-administrator users, and then the only way to regain access to the resource is for an administrator or a member of the Restore Operators group to take ownership of it. This makes the file or folder owner important with respect to what permissions are allowed or denied for a given resource.

    Ownership can be taken or transferred in several ways. The current owner of an object can transfer ownership to another user or group. A member of the Administrators group can take ownership of an object or transfer ownership to another user or group—even if administrators are locked out of the resource according to the permissions. Any user with the "Take Ownership" permission on the object can take ownership, as can any member of the "Backup Operators" group (or anyone else with the "Restore Files And Directories" user right, for that matter).

    This tutorial will show you different ways to change the owner (take ownership) of a file, folder, drive, or registry key to any user or group in Windows 10.

    By default, you must be signed in as an administrator to be able to take ownership of an object.

    warning   Warning
    Do not change the owner of your Windows drive (ex: C: ). Doing so could result in Windows becoming very unstable.


    CONTENTS:

    • Option One: To Take Ownership using Context Menu
    • Option Two: To Change Owner of an Object using TAKEOWN Command
    • Option Three: To Change Owner of an Object using ICACLS Command
    • Option Four: To Change Owner of Object in Advanced Security Settings Dialog







    Change Owner of File, Folder, Drive, or Registry Key in Windows 10 OPTION ONE Change Owner of File, Folder, Drive, or Registry Key in Windows 10
    To Take Ownership using Context Menu





    Change Owner of File, Folder, Drive, or Registry Key in Windows 10 OPTION TWO Change Owner of File, Folder, Drive, or Registry Key in Windows 10
    To Change Owner of an Object using TAKEOWN Command

    Tip   Tip
    If you like, you could also type takeown /? in the elevated command prompt and press Enter to see a complete list of available switches and options that you could use with the takeown commands below.

    1. Open an elevated command prompt, and do step 2, step 3, or step 4 below depending on what object you would like to change owner of.


    2. To Change Owner of File using TAKEOWN Command

    A) In the elevated command prompt, type the command you want below, press Enter, and go to step 5 below.

    (To change owner to currently logged on user)

    takeown /F "full path of file with file extension"


    (To change owner to Administrators group)

    takeown /F "full path of file with file extension" /A

    Note   Note
    Substitute full path of file with file extension with the actual full path of the file with it's file extension that you want to take ownership of within quotes.

    For example:

    takeown /F "C:\Windows\file.exe" /A


    3. To Change Owner of All Files with same File Extension in Folder or Drive using TAKEOWN Command

    A) In the elevated command prompt, type the command you want below, press Enter, and go to step 5 below.

    (To change owner to currently logged on user)

    takeown /F "full path of folder or drive\*.file extension"


    (To change owner to Administrators group)

    takeown /F "full path of folder or drive\*.file extension" /A

    Note   Note
    Substitute full path of folder or drive with the full path of the folder or drive letter, and substitute file extension with the actual file extention that you want to take ownership of within quotes.

    For example:

    takeown /F "C:\Windows\*.txt" /A



    4. To Change Owner of Folder or Drive using TAKEOWN Command
    NOTE: This command will take ownership of the folder or drive, and all files and subfolders in the folder or drive.


    A) In the elevated command prompt, type the command you want below, press Enter, and go to step 5 below.

    (To change owner to currently logged on user)

    takeown /F "full path of folder or drive" /R /D Y


    (To change owner to Administrators group)

    takeown /F "full path of folder or drive" /A /R /D Y

    Note   Note
    Substitute full path of folder or drive with the full path of the folder or drive letter that you want to take ownership of within quotes.

    For example:

    takeown /F "F:" /A /R /D Y

    takeown /F "F:\Folder" /A /R /D Y




    5. When finished, you can close the elevated command prompt if you like.

    6. You will now need to set permissions to allow you access to this file, folder, or drive.







    Change Owner of File, Folder, Drive, or Registry Key in Windows 10 OPTION THREE Change Owner of File, Folder, Drive, or Registry Key in Windows 10
    To Change Owner of an Object using ICACLS Command

    Tip   Tip
    You could also type icacls /? in the elevated command prompt and press Enter to see a complete list of availble switches and options that you could use with the icacls commands below.

    1. Open an elevated command prompt, and do step 2, step 3, step 4, step 5 below depending on what object you would like to change owner of.


    2. To Change Owner of File using ICACLS Command

    A) In the elevated command prompt, type the command you want below, press Enter, and go to step 6 below.

    (To change owner to any user)

    icacls "full path of file with file extension" /setowner "user name" /T /C


    (To change owner to Administrators group)

    icacls "full path of file with file extension" /setowner "Administrators" /T /C


    (To change owner to TrustedInstaller)

    icacls "full path of file with file extension" /setowner "NT SERVICE\TrustedInstaller" /T /C

    Note   Note
    Substitute full path of file with file extension with the actual full path of the file with it's file extension that you want to take ownership of within quotes.

    Substitute user name with the actual user name of the user account you want to set as owner within quotes. For a Microsoft account, you would use the email address as the user name.

    For example:

    icacls "C:\Windows\file.exe" /setowner "Administrators" /T /C


    3. To Change Owner of All Files with same File Extension in Folder or Drive using ICACLS Command

    A) In the elevated command prompt, type the command you want below, press Enter, and go to step 6 below.

    (To change owner to any user)

    icacls "full path of folder or drive\*.file extension" /setowner "user name" /T /C


    (To change owner to Administrators group)

    icacls "full path of folder or drive\*.file extension" /setowner "Administrators" /T /C


    (To change owner to TrustedInstaller)
    Code:
    icacls "full path of folder or drive\*.file extension" /setowner "NT SERVICE\TrustedInstaller" /T /C
    Note   Note
    Substitute full path of folder or drive with the full path of the folder or drive letter, and substitute file extension with the actual file extension that you want to take ownership of within quotes.

    Substitute user name with the actual user name of the user account you want to set as owner within quotes. For a Microsoft account, you would use the email address as the user name.

    For example:

    icacls "C:\Windows\*.txt" /setowner "Administrators" /T /C


    4. To Change Owner of Folder or Drive and All Contents using ICACLS Command

    A) In the elevated command prompt, type the command you want below, press Enter, and go to step 6 below.

    (To change owner to any user)

    icacls "full path of folder or drive" /setowner "user name" /T /C


    (To change owner to Administrators group)

    icacls "full path of folder or drive" /setowner "Administrators" /T /C


    (To change owner to TrustedInstaller)

    icacls "full path of folder or drive" /setowner "NT SERVICE\TrustedInstaller" /T /C


    Note   Note
    Substitute full path of folder or drive with the full path of the folder or drive letter that you want to take ownership of within quotes.

    Substitute user name with the actual user name of the user account you want to set as owner within quotes. For a Microsoft account, you would use the email address as the user name.

    For example:

    icacls "C:\Windows\Folder" /setowner "Administrators" /T /C


    5. To Change Owner of Only Folder or Drive using ICACLS Command

    A) In the elevated command prompt, type the command you want below, press Enter, and go to step 6 below.

    (To change owner to any user)

    icacls "full path of folder or drive" /setowner "user name" /C


    (To change owner to administrators group)

    icacls "full path of folder or drive" /setowner "Administrators" /C


    (To change owner to TrustedInstaller)

    icacls "full path of folder or drive" /setowner "NT SERVICE\TrustedInstaller" /C


    Note   Note
    Substitute full path of folder or drive with the full path of the folder or drive letter that you want to take ownership of within quotes.

    Substitute user name with the actual user name of the user account you want to set as owner within quotes. For a Microsoft account, you would use the email address as the user name.

    For example:

    icacls "C:\Windows\Folder" /setowner "Administrators" /C


    6. When finished, you can close the elevated command prompt if you like.

    7. You will now need to set permissions to allow you access to this file, folder, or drive.






    Change Owner of File, Folder, Drive, or Registry Key in Windows 10 OPTION FOUR Change Owner of File, Folder, Drive, or Registry Key in Windows 10
    To Change Owner of Object in Advanced Security Settings Dialog

    1. Do step 2 or step 3 below depending on what object you would like to change owner of.

    2. To Change Owner of File, Folder, or Drive in Advanced Settings

    A) Right click or press and hold on the file, folder, or drive that you want to change owner of, click/tap on Properties, and go to step 4 below.

    OR

    B) Select a file, folder, or open a drive that you want to change owner of, click/tap on the Share tab, click/tap on the Advanced security button in the ribbon, and go to step 5 below. (see screenshot below)

    Click image for larger version. 

Name:	Change_Owner_File-1.jpg 
Views:	1141 
Size:	89.0 KB 
ID:	10528

    3. To Change Owner of Registry Key in Advanced Settings

    A) In the left pane of Registry Editor (regedit), right click or press and hold on the registry key that you want to change owner of, click/tap on Permissions, and go to step 4 below. (see screenshot below)

    Click image for larger version. 

Name:	Change_Owner_Registry_Key-1.jpg 
Views:	1218 
Size:	63.9 KB 
ID:	10532

    4. Click/tap on the Security tab, and click/tap on the Advanced button. (see screenshots below)

    Note   Note
    If you see the left screenshot below, then it means that you have access to this item, and can change the owner to any user or group you like.


    If you see the right screenshot below, then it means that your user account does not have at least Read permission for this object. Basically, no access rights. When you get to step 8 below, you will need to change the owner to your user account name, and set permissions to allow you account full control at step 13 below.


    Click image for larger version. 

Name:	Change_Owner_properties-2.jpg 
Views:	1612 
Size:	133.3 KB 
ID:	10531

    5. At the top and to the right of the current Owner, click/tap on the Change link. (see screenshots below)

    Click image for larger version. 

Name:	Change_Owner_Advanced_Security_Settings-3.jpg 
Views:	2161 
Size:	76.8 KB 
ID:	10526
    Click image for larger version. 

Name:	Change_Owner_Advanced_Security_Settings-3B.jpg 
Views:	1424 
Size:	72.3 KB 
ID:	10527

    6. If prompted by UAC, click/tap on Yes.

    7. Click/tap on the Advanced button. (see screenshot below)

    Tip   Tip
    If you wanted to set the Administrators group as the owner, then type Administrators in the "Enter the object name to select" box, click/tap on Check Names to verify, and go to step 9 below instead.


    If you wanted to set TrustedInstaller as the owner, then type this below in the "Enter the object name to select" box, click/tap on Check Names to verify, and go to step 9 below instead.

    NT SERVICE\TrustedInstaller


    Name:  Change_Owner_Select-4.jpg
Views: 167835
Size:  28.8 KB

    8. Click/tap on the Find Now button. At the bottom under the Name column, select a user name (ex: Shawn Brink) or group (ex: Administrators) that you would like to change owner to, and click/tap on OK. (see screenshot below)

    Click image for larger version. 

Name:	Change_Owner_Select-5.jpg 
Views:	1515 
Size:	192.1 KB 
ID:	10534

    9. Click/tap on OK. (see screenshot below)

    Name:  Change_Owner_Select-6.jpg
Views: 167574
Size:  31.7 KB

    10. If this is a file, then click/tap on OK. (see screenshot below)

    Click image for larger version. 

Name:	Change_Owner_File-7B.jpg 
Views:	1780 
Size:	78.3 KB 
ID:	10530

    11. If this is a folder, drive, or registry key, then you will also have the option to check the Replace owner of subcontainers and objects box to also change the owner of the folder/drive contents or registry key subkeys as well if you like. Click/tap on OK. (see screenshot below)

    Click image for larger version. 

Name:	Change_Owner_File-7A.jpg 
Views:	1684 
Size:	97.8 KB 
ID:	10529

    12. If prompted, click/tap on Yes. (see screenshot below)

    Name:  Change_Owner_Windows_Security-8.jpg
Views: 167374
Size:  25.2 KB

    13. You will now need to set permissions to allow you access to this file, folder, drive, or registry key.



    That's it,
    Shawn



  1. Posts : 18
    Windows 10 64-bit "Big Shit"
       26 Dec 2015 #1

    Not Working for Subkeys


    Hi,

    I followed tour tutorial to change some registry keys permissions, and found it very easy to follow because it is quite detailed and well explained as always with Brinhk's. However, I fill the case to "Replace owner on subcontainers and objects" (step 11). Under "Applies to" I can red "This key and subkeys", but it doesn't work, and I get an error message:
    Unable to set new owner on key name
    Access is denied

    For the change to be accepted, I have to empty the case to "Replace owner on subcontainers and objects".

    Therefore, I have to repeat the same for each subcontainer, which takes me a very long time because I have to do that on several registry keys with many subkeys on different parts of the registry.
    Does it have to be done in a special order? I start with "Owner Unable to display current owner. Change", and then go to the "Add" button.

    How can I make it work, please?
    Last edited by Neophile; 26 Dec 2015 at 12:04.
      My ComputerSystem Spec


  2. Posts : 22,304
    64-bit Windows 10 Pro build 16251
    Thread Starter
       26 Dec 2015 #2

    Hello Neophile,

    Did you change the owner to your account instead of "Administrators"?

    If so, then see if changing the owner and permissions of the parent key first, then going back to "Replace owner on subcontainers and objects" may do the trick.
      My ComputersSystem Spec


  3. Posts : 18
    Windows 10 64-bit "Big Shit"
       26 Dec 2015 #3

    Hello Brink,

    Many thanks for your quick reply. I am using (logged on with) the Administrator account. So all my trials are under Administrator, and I chose Administrators as the Owner. Now, after your reply, I tried to add also my account to the owners, but it does not accept more than one owner, So I left it on Administrators and still logged in as that, but no inheritance .
      My ComputerSystem Spec


  4. Posts : 22,304
    64-bit Windows 10 Pro build 16251
    Thread Starter
       26 Dec 2015 #4

    As a test, change the owner to "Administrator" and permissions to "Allow" "Full Control" of the parent key first.

    Afterwards, go back to change owner again, but this time check Replace owner of subcontainers and objects and the inheritable permissions box at the bottom, and click OK to see if it applies then.

    What key are you doing this with?
      My ComputersSystem Spec


  5. Posts : 18
    Windows 10 64-bit "Big Shit"
       26 Dec 2015 #5

    Eureka! It worked with your help, the priorities and coming back.

    This is rather complicated. I didn't intend to make you waste your time reading all this, but if you ask here it goes.

    I installed an old HP printer, but made a mistake with the letters at the ending of the model number. It appeared on "Devices and printers", but should have installed the right one (same model number, but different ending letters). I was an ass hole and installed the right one, without removing the other one. Then I started having printing problems. But I could not remove the first installed because it was no longer showing on "Devices and printers". So I started clearing al entries in the registry containing its name. All I could remove was only the last installed one, which was not working properly. This happened because I did not choose the right name. Windows 7 finds the printer and installs it itself, but with 10 I have to install it manually like in old times, from a list from manufacturers.

    Now, it is done, but for one key, because it has an entry allowing the owner to read only:
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\SWD\PRINTENUM\{A9862F5A-170C-4046-A6CE-1C78A158F95B}

    This key has three permission entries: System, Owner Riights, and Everyone. The Owner Rights Access is set to Read only!
    I put Administrators as the owner, and tried to clear the inheritances (MACHINE\SYSTEM\CurrentControlSet), as suggested on the error message, but it does not allow to save it that way, so I'm still blocked before reinstalling the printer with the right model name.

    I will give you the final result later because I have to go out now for a couple of hours.

    Thank you very much.
      My ComputerSystem Spec


  6. Posts : 22,304
    64-bit Windows 10 Pro build 16251
    Thread Starter
       26 Dec 2015 #6

    Great news. You should be able to change that last one to "Full Control" instead of "Read only".
      My ComputersSystem Spec


  7. Posts : 18
    Windows 10 64-bit "Big Shit"
       26 Dec 2015 #7

    That is exactly where my last provable lies. I can't do that change. The Edit button on those entries is not Edit, but View.

    It seems that it doesn't accept any change, but I believe there must be a way that I ignore. Have you tried to take ownership of a printer subkey on your computer? I wonder. Any subkey under the following key is a printer of fax of any sort, as we can read on their FriendlyName values. It is one of those that I need to delete.

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\SWD\PRINTENUM

    I have changed quite a lot of permissions following your helping instructions. I am stuck with that one only. Sorry...
      My ComputerSystem Spec


  8. Posts : 22,304
    64-bit Windows 10 Pro build 16251
    Thread Starter
       26 Dec 2015 #8

    That is one stubborn key. See if you may be able to set permissions and delete the key while signed in to the built-in elevated Administrator account.

    https://www.tenforums.com/tutorials/2...dows-10-a.html
      My ComputersSystem Spec


  9. Posts : 18
    Windows 10 64-bit "Big Shit"
       26 Dec 2015 #9

    Oh! I am so sorry I haven't told you before, that is the account I have been using all along this drama to avoid other problems.
      My ComputerSystem Spec


 
Page 1 of 7 123 ... LastLast

Related Threads
How Add or Remove Folders from This PC in Windows 10 The This PC window includes a Folders group that displays a linked 3D Objects, Desktop, Documents, Downloads, Music, Pictures, and Videos folder from the current user account's...
How to Show Hidden Files, Folders, and Drives in Windows 10 Hidden files, folders, and drives do not show by default in Windows. Windows protected system files (ex: desktop.ini files) are hidden by default. You can also manually hide a file or...
How to Add or Remove Folders on Start List in Windows 10 The Start menu in Windows 10 has a Start list that you can customize which folders appear in the list. You can add or remove the File Explorer, Settings, your Documents, your Downloads,...
I'm running VBox 5.0 on Windows 8.1 and have created VMs for Windows 7 and Windows 10 release 10240. In both VMs I have installed Visual Basic 6 (VB6). Everything is working fine except for one strange difference. When running the Windows 7 VM, I...
Hi everyone, I've noticed that whenever I plug in a usb thub stick or hard drive Windows 10 (Build 9879) is automatically creating empty Videos, Music, Downloads etc folders everytime. This is quite annoying, anyone know how to turn this off?...
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 09:21.
Find Us