Windows 8 and 8.1 Forums


Take Ownership of a File, Folder, Drive, or Registry Key in Windows 8

  1. #1
    Take Ownership of a File, Folder, Drive, or Registry Key in Windows 8

    Take Ownership of a File, Folder, Drive, or Registry Key in Windows 8
    How to "Take Ownership" of a File, Folder, Drive, or Registry Key in Windows 8 and 8.1
    Published by Brink is online now
    30 Sep 2011
    Default Take Ownership of a File, Folder, Drive, or Registry Key in Windows 8

    Published by


    Brink's Avatar
    Administrator

    Join Date: Jul 2009
    Posts: 20,471

    How to "Take Ownership" of a File, Folder, Drive, or Registry Key in Windows 8 and 8.1


    information   Information
    This will show you how to take ownership of a file, folder, drive, registry key objects to control how access permissions are set on the object and for what users and groups permissions are granted in Windows 8, Windows RT, Windows 8.1, and Windows RT 8.1.

    You must be signed in as an administrator to be able to do the steps below to take ownership of an item.

    warning   Warning
    DO NOT take ownership of the Windows 8 C: drive.

    Doing so, could result in Windows 8 becoming very unstable.


    CONTENTS:

    • Option One: Take Ownership and Permission of an Object from the Context Menu
    • Option Two: Take Ownership of an Object using TAKEOWN Command
    • Option Three: Take Ownership of an Object using ICACLS Command
    • Option Four: To Manually Take Ownership of Object in Advanced Security Settings








    OPTION ONE
    Take Ownership and Permission of an Object from the Context Menu


    NOTE: This option will quickly grant your administrator account ownership of a file, folder (and contents), or drive (and contents), and grant "full control" permission to the administrators group by right clicking on the file, folder, or drive and clicking on Take Ownership.


    1. For how, see: How to Add "Take Ownership" to the Context Menu in Windows 8


    2. Afterwards, you or members of the administrators group will now be able to grant access permissions for this file, folder, or drive if you like.









    OPTION TWO
    Take Ownership of an Object using TAKEOWN Command

    NOTE: You could also type takeown /? in the elevated command prompt for a complete list of available switches and options that you could use with the takeown command.


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


    2. To Take Ownership of a File using TAKEOWN Command

    A) In the elevated command prompt, type the command you want below, press Enter, and go to step 5 below.
    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.


    (To grant currently logged on user ownership of)

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


    (To grant administrators group ownership of)

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


    For example:


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


    3. To Take Ownership of All Files with the same File Extension in a 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.
    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.


    (To grant currently logged on user ownership of)

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


    (To grant administrators group ownership of)

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


    For example:


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


    4. To Take Ownership of a 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.
    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.


    (To grant currently logged on user ownership of)

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


    (To grant administrators group ownership of)

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


    For example:

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

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


    5. When finished, close the elevated command prompt.

    6. You or members of the administrators group will now be able to grant access permissions for this file, folder, or drive if you like.





    OPTION THREE
    Take Ownership of an Object using ICACLS Command

    NOTE: You could also type icacls /? in the elevated command prompt for a complete list of availble switches and options that you could use with the icacls command.



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


    2. To Take Ownership of a File using ICACLS Command

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

    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.



    (To set any user as owner)

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


    (To set administrators group as owner)

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


    (To set TrustedInstaller as owner)

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


    For example:

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


    3. To Take Ownership of All Files with the same File Extension in a 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.

    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.



    (To set any user as owner)

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


    (To set administrators group as owner)

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


    (To set TrustedInstaller as owner)

    Code:
    icacls "full path of folder or drive\*.file extension" /setowner "NT SERVICE\TrustedInstaller" /T /C


    For example:


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


    4. To Take Ownership of a 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.

    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.



    (To set any user as owner)

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


    (To set administrators group as owner)

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


    (To set TrustedInstaller as owner)

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


    For example:

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


    5. To Take Ownership of Only a 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.

    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.



    (To set any user as owner)

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


    (To set administrators group as owner)

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


    (To set TrustedInstaller as owner)

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


    For example:

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


    6. When finished, close the elevated command prompt.

    7. You or members of the administrators group will now be able to grant access permissions for this file, folder, or drive if you like.





    OPTION FOUR
    To Manually Take Ownership of Object in Advanced Security Settings


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


    2. To Take Ownership of a File, Folder, or Drive in Advanced Properties

    A) Right click or press and hold on the file, folder, or drive that you want to grant a user or group ownership 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 grant a user or group ownership 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

    3. To Take Ownership of a Registry Key in Advanced Properties

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

    Click image for larger version


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

    Note   Note
    If you see the top 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 bottom screenshot below, then it means that your user account does not have at least Read permission for this item. Basically, no access rights. When you get to step 9 below, you will need to select your user account name to change the owner to.


    Name:  Ownership-1-File_Folder_Drive.jpg
Views: 179551
Size:  72.2 KB

    Name:  No_Permission-1.png
Views: 107188
Size:  26.3 KB


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

    Click image for larger version


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


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

    Note   Note
    If you wanted to set the Administrators group as the owner, then type Administrators in the "Enter the object name to select" box, and go to step 10 below instead.


    If you wanted to set TrustedInstaller as the owner, then type this below in the "Enter the object name to select" box, and go to step 10 below instead.

    NT SERVICE\TrustedInstaller


    Name:  Ownership-3.jpg
Views: 178562
Size:  37.0 KB


    8. Click/tap on the Find Now button. (see screenshot below)

    Name:  Ownership-4.jpg
Views: 178671
Size:  58.5 KB


    9. At the bottom under the Name column, select a user (username) or group that you would like to grant ownership to, and click/tap on OK. (see screenshot below)
    NOTE: This would normally be your administrator account's name, or the administrators group.

    Name:  Ownership-5.jpg
Views: 178672
Size:  88.4 KB


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

    Name:  Ownership-6.jpg
Views: 178082
Size:  39.4 KB


    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 ownership of the folder/drive contents or registry key subkeys as well if you like. (see screenshot below)
    NOTE: A file will not have this option available.

    Click image for larger version


    12. Verify that the new owner is correct, and click/tap on OK to apply. (see screenshot above)


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

    Name:  Ownership-8.jpg
Views: 177814
Size:  39.8 KB


    14. You and the owner (set at step 9), will now be able to grant access permissions for this file, folder, drive, or registry key if you like.
    NOTE: See OPTION TWO in the link in this step.



    That's it,
    Shawn



  2. #1


    Hi Shawn,

    Is there any way to reset all ownership(s) to default on the Windows 7 or 8?

      My System SpecsSystem Spec

  3. #2


    Posts : 20,471
    64-bit Windows 10 build 10166


    Hello Nonpasaran,

    As far as I know for the "Owner", either a system restore to before they were changed or to reinstall Windows.
      My System SpecsSystem Spec

  4. #3


    I get it

    Thank you shawn
      My System SpecsSystem Spec


  5. #4


    Posts : 20,471
    64-bit Windows 10 build 10166


    You're welcome. Yeah, it would be nice to have a reset option sometimes, but that could also be a breach of security.
      My System SpecsSystem Spec

  6. #5


    INDIA
    Posts : 148
    Windows 8 RP, Windows 7


    Hello Brink, I can't take ownership of a drive using your method.

    Name:  509709879687697.PNG
Views: 176211
Size:  15.5 KB

    I'm running Windows 8 CP. Thanks
      My System SpecsSystem Spec

  7. #6


    Posts : 20,471
    64-bit Windows 10 build 10166


    Hello Kapilarya,

    You almost have it. The command should be F: instead of F:\

    takeown /F "F:" /R /D Y
      My System SpecsSystem Spec

  8. #7


    INDIA
    Posts : 148
    Windows 8 RP, Windows 7


    Quote Originally Posted by Brink View Post
    Hello Kapilarya,

    You almost have it. The command should be F: instead of F:\

    takeown /F "F:" /R /D Y
    That works, thanks
      My System SpecsSystem Spec

  9. #8


    Posts : 20,471
    64-bit Windows 10 build 10166


    You're most welcome.
      My System SpecsSystem Spec

  10. #9


    Posts : 24
    Win8 Pro 64bit


    Thank you for this. I had gotten adept at doing this with Win7 but Win 8 threw me for a loop! Just enough different to frustrate the beejeebus out of me.
      My System SpecsSystem Spec

Page 1 of 8 123 ... LastLast
Take Ownership of a File, Folder, Drive, or Registry Key in Windows 8

Similar Threads
Tutorial Forum
Ownership of Registry Keys?
I have come across an issues with potential problems with ownership of registry keys on my machine. Up until now, I was not aware that registry keys had owners, like directories. Why is this? Is there any link between the ownership of directories and registry keys. I haven't deliberately...
General Support
Can't save file to C:\ despite changing ownership & access
So sick of the patronisation of recent Windows releases. I am currently on 8.1. I can't figure out what else I have to do, to save a config file to the root of C. It's an old application, and that's where the config needs to go. I am worried that the medicine is worse than the illness in this...
General Support
Take ownership of file
I installed windows 8.1. I wanted to deleted the Windows.old but a pop-up told me that I needed permission. Isn't there a way to take ownership of a file?
General Support
Take ownership (folder) not affecting submenus..
I'd like to have it affect all remaining submenus + files like in win7
General Support
Can't change drive permissions or ownership
Hello everyone, I recently installed Windows 8 Pro onto an SSD. I have another 500gb HDD plugged in to store programs, games etc. However, I cannot do anything with the drive. I add folders etc. I have tried to change permissions, add permissions and change ownership but I get an error trying to...
Drivers & Hardware
Unable to delete folder - Permissions & ownership issue
Hi All, Have a problem that sounds super simple, but, for some reason isn't... I can't delete a folder! There is a folder left over from an uninstalled product called "Symantec". When I attempt to delete this, I get the message "You require permission from SYSTEM to make changes to this...
System Security
Unable To Take Ownership Of A System 32 File
Hi guys.. I'm trying to modifying a system 32 file i.e. twinui.dll.mui in Windows 8 CP. I already taken the ownership of the file using Brink's tutorial. But when I edited the file with Resource Hacker and after tweaking and compiling script, I'm unable to save this file. Here is what I'm...
General Support

Eight Forums Android App Eight Forums IOS App Follow us on Facebook