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


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.


Note   Note


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.


Note   Note


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:
[B]icacls "[COLOR=red]full path of folder or drive[COLOR=#222222]\*.[/COLOR][COLOR=red]file extension[/COLOR][/COLOR]" /setowner "NT SERVICE\TrustedInstaller" /T /C[/B]


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.


Note   Note


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.


Note   Note


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)

ribbon.jpg


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)

Ownership-1-Registry.jpg




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.



Ownership-1-File_Folder_Drive.jpg

No_Permission-1.png


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

Ownership-2.jpg


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



Ownership-3.jpg


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

Ownership-4.jpg


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.

Ownership-5.jpg


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

Ownership-6.jpg


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.

Ownership-7.jpg


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)

Ownership-8.jpg


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



 

Attachments

  • Control_Panel-2.png
    Control_Panel-2.png
    12.1 KB · Views: 495
Last edited by a moderator:
Hello Nonpasaran,

As far as I know for the "Owner", either a system restore to before they were changed or to reinstall Windows. :(
 
You're welcome. Yeah, it would be nice to have a reset option sometimes, but that could also be a breach of security.
 
Hello Kapilarya,

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

takeown /F "F:" /R /D Y
 
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.
 
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.

You're most welcome Sandra, and welcome to Eight Forums. It does take a bit to get used to the difference. :)
 
Last edited:
You're most welcome Sandra, and welcome to Eight Forums. It does take a bit to get used to the difference. :)

First post in the Windows 8 forum, but frequent visitor in the Win7 forum. Strange to have to reregister when you can switch back and forth between them via a button on the browser window. heh
 
Unfortunately, even though they are sister sites, they are still separate sites that also require separate registration. :(
 
Manually Taking Ownership-pc hung up

After having said "Yes" to the dialog depicted in the last step in Manually taking Ownership of a Drive in Advanced Properties; i.e. "You do not have permission to read the contents....etc.etc." - I encountered a new dialog that said I have a 'security' error apparently re: a particular saved favorite/bookmark and was given two choices, Continue or Cancel. I chose Continue, and it is now hung up. I also previously tried "Cancel" - it hung up there too, all night, and I finally gave up and restarted the pc....went thru all the steps again, and chose "Continue" this time....and yep, it's hung up alright.
 
Last edited:
Hello mgs4real, and welcome to Eight Forums.

If this was for a system drive, then that would normal since you shouldn't take ownership of a system drive for that reason.

Instead, you would want to take ownership of the file or folder it is in it instead.

Hope this helps, :)
Shawn
 
Hello jhomar, and welcome to Eight Forums.

By default, you should already be owner of your Libraries folder.

You might see if doing it manually using step 2 in OPTION THREE may work better for you.

Hope this helps, :)
Shawn
 
Hello jhomar, and welcome to Eight Forums.

By default, you should already be owner of your Libraries folder.

You might see if doing it manually using step 2 in OPTION THREE may work better for you.

Hope this helps, :)
Shawn

I wasn't the owner originally, however option three did work for me thank you.
 
Hi! Brink

My Device: Dell 15R Turbo with Windows 8 Pre-Installed

I had lost access to my c-drive suddenly without anything done by me. I had just installed Nod 32 Smart Security after uninstalling McAfee Anitvirus and rebooting my laptop.

By this method from MS forum I got access back to c-drive: Link: Lost access to C:\ Drive. "Can't open access control - Microsoft Community
I have the same problem too, but solved the problems with the following methods:
1) Run computer in Safe mode with command prompt by tapping F8 when your computer boot up

2) Logon to your user account (with admin rights)
3) Type "net user administrator /active:yes"
4) Ctrl-alt-del to logoff
5) Logon as administrator
6) Ctrl-alt-del start task manager
7) Disable UAC with RegEdit

  1. Type regedit
  2. Navigate to the following registry key: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System
  3. Locate the following REG_DWORD value: EnableLUA
  4. Set the value of EnableLUA to 0.
  5. Optional step to suppress UAC consent prompt dialog, locate the following REG_DWORD value: ConsentPromptBehaviorAdmin
  6. Set the value of ConsentPromptBehaviorAdmin to 0 (optional).
  7. Exit from Registry Editor and restart the computer to turn off UAC
8) Reboot computer
9) Goto My computer, right click C: drive, then properties, security, advance, effective permission, select, enter your own user name, ok
Done, you have access to C: now. But must do the following to increase security because you just compromise your own computer security in this way.
10) Enable back your UAC

  1. press windows button + R
  2. type in msconfig
  3. goto tools, change uac setting, launch, set to default
  4. Reboot, done =)

When i reached the 9th step I couldn't add my username as there was no owner specified in advance settings. So I unknowingly choose administrator account as owner or the c-drive and later added permissions to various accounts like: Adminstrators [Computer-name/Administrators], Authenticated Users, Users/[Computer-name/User], SYSTEM... Later enabled UAC to default level...

Although I'm not facing any problem at present but changes I have noticed are:
There are almost no UAC pop-ups which came up when I launch any executable file or program...
When I open apps like IDM i get message you are running IDM with Administrator privileges. IDM won't be able to take over downlods from browsers in this manner...

So i guess its because I have chosen owner of c-drive as admin account?

My concern for this post is because in your main post of this topic you have mentioned never take ownership of c-drive and even found many post on net not to do so... What should I do now? What do you suggest? By default who should be the owner of C-drive? SYSTEM ?

for my other partition [E Drive] i found owner is SYSTEM ... Also in e-drive there is one another admin account that i never created. You can see that in 2nd screenshot... Even that weird named user account doesn't show up in control-panel->user-accounts... Is it created by virus or its created by antivirus? Nod32 offers system theft protection by which it disables user account and creates some ghost account for thief to use when activated this features is activated from net webpage and collects data and webcam pics of thief... I guess may be i ran into this losing access to c-drive issues after i configured this feature.. ? what do u say?

I'm attaching the screen-shots for your reference.... Plz help me... And if you suggest to change owner of c-drive to system will i be able to do this in normal mode or should do it in safe mode after disabling UAC? Also I'm worried that there won't be any system crash or issues while I change the owner of C-drive from current state... bcoz at present I don't have any major issues.. ?

1.C-drive.Advance Security.jpg

2.E-drive.Advance Security.jpg
 
Back
Top