take ownership of a file, folder, drive, or registry key in windows 8

15
5/1/2014 Take Ownership of a File, Folder, Drive, or Registry Key in Windows 8 http://www.eightforums.com/tutorials/2808-take-ownership-file-folder-drive-registry-key-windows-8-a.html 1/15 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 This will show you how to take ownership of a file, folder, drive, registry key objects to control access permissions are set on the object and for what users and groups permissions are granted inWindows 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 a Warning DO NOT take ownership of the Windows 8 C: drive. Doing so, could result in Windows 8 becoming very unstable. 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

Upload: frankyang

Post on 15-Jan-2016

12 views

Category:

Documents


0 download

DESCRIPTION

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

TRANSCRIPT

Page 1: Take Ownership of a File, Folder, Drive, Or Registry Key in Windows 8

5/1/2014 Take Ownership of a File, Folder, Drive, or Registry Key in Windows 8

http://www.eightforums.com/tutorials/2808-take-ownership-file-folder-drive-registry-key-windows-8-a.html 1/15

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

This will show you how to take ownership of a file, folder, drive, registry key objects to control howaccess permissions are set on the object and for what users and groups permissions are grantedinWindows 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

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

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

OPTION ONE Take Ownership and Permission of an Object from the ContextMenu

NOTE: This option will quickly grant your administrator account ownership of a file, folder (andcontents), or drive (and contents), and grant "full control" permission to the administratorsgroup 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 accesspermissions for this file, folder, or drive if you like.

OPTION TWO Take Ownership of an Object using TAKEOWN Command

Page 2: Take Ownership of a File, Folder, Drive, Or Registry Key in Windows 8

5/1/2014 Take Ownership of a File, Folder, Drive, or Registry Key in Windows 8

http://www.eightforums.com/tutorials/2808-take-ownership-file-folder-drive-registry-key-windows-8-a.html 2/15

NOTE: You could also type takeown /? in the elevated command prompt for a complete list ofavailble 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 objectyou 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 goto step 5below.NOTE: Substitute full path of file with file extension with the actual full path of the file withit'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 orDriveusing TAKEOWN Command

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

Page 3: Take Ownership of a File, Folder, Drive, Or Registry Key in Windows 8

5/1/2014 Take Ownership of a File, Folder, Drive, or Registry Key in Windows 8

http://www.eightforums.com/tutorials/2808-take-ownership-file-folder-drive-registry-key-windows-8-a.html 3/15

4. To Take Ownership of a Folder or Drive using TAKEOWN CommandNOTE: This command will take ownership of the folder or drive, and all files and subfolders in thefolder or drive.

A) In the elevated command prompt, type the command you want below, press Enter, and goto step 5below.NOTE: Substitute full path of folder or drive with the full path of the folder or drive letterthat 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 forthis 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 availbleswitches 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 objectyou 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 goto step 6below.

Page 4: Take Ownership of a File, Folder, Drive, Or Registry Key in Windows 8

5/1/2014 Take Ownership of a File, Folder, Drive, or Registry Key in Windows 8

http://www.eightforums.com/tutorials/2808-take-ownership-file-folder-drive-registry-key-windows-8-a.html 4/15

Note

Substitute full path of file with file extension with the actual full path of the file with it's file extensionthat 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 withinquotes. 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 orDriveusing ICALCS Command

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

Note

Substitute full path of folder or drive with the full path of the folder or drive letter, and substituteextension with the actual file extention 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 withinquotes. 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

Page 5: Take Ownership of a File, Folder, Drive, Or Registry Key in Windows 8

5/1/2014 Take Ownership of a File, Folder, Drive, or Registry Key in Windows 8

http://www.eightforums.com/tutorials/2808-take-ownership-file-folder-drive-registry-key-windows-8-a.html 5/15

/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 ICALCSCommand

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

Note

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

Substitute user name with the actual user name of the user account you want to set as owner withinquotes. 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 ICALCS Command

Page 6: Take Ownership of a File, Folder, Drive, Or Registry Key in Windows 8

5/1/2014 Take Ownership of a File, Folder, Drive, or Registry Key in Windows 8

http://www.eightforums.com/tutorials/2808-take-ownership-file-folder-drive-registry-key-windows-8-a.html 6/15

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

Note

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

Substitute user name with the actual user name of the user account you want to set as owner withinquotes. 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 forthis file, folder, or drive if you like.

OPTION FOUR To Manually Take Ownership of Object in Advanced SecuritySettings

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 orgroup ownership of, click/tap on Properties, and go to step 4 below.

Page 7: Take Ownership of a File, Folder, Drive, Or Registry Key in Windows 8

5/1/2014 Take Ownership of a File, Folder, Drive, or Registry Key in Windows 8

http://www.eightforums.com/tutorials/2808-take-ownership-file-folder-drive-registry-key-windows-8-a.html 7/15

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 goto step 5 below. (see screenshot below)

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 keythat you want to grant a user or group ownership of, click/tap on Permissions, and goto step 4 below. (see screenshot below)

Page 8: Take Ownership of a File, Folder, Drive, Or Registry Key in Windows 8

5/1/2014 Take Ownership of a File, Folder, Drive, or Registry Key in Windows 8

http://www.eightforums.com/tutorials/2808-take-ownership-file-folder-drive-registry-key-windows-8-a.html 8/15

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

Note

If you see the top screenshot below, then it means that you have access to this item, and can change theowner 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 Readpermission for this item. Basically, no access rights. When you get to step 9 below, you will need to selectyour user account name to change the owner to.

Page 9: Take Ownership of a File, Folder, Drive, Or Registry Key in Windows 8

5/1/2014 Take Ownership of a File, Folder, Drive, or Registry Key in Windows 8

http://www.eightforums.com/tutorials/2808-take-ownership-file-folder-drive-registry-key-windows-8-a.html 9/15

Page 10: Take Ownership of a File, Folder, Drive, Or Registry Key in Windows 8

5/1/2014 Take Ownership of a File, Folder, Drive, or Registry Key in Windows 8

http://www.eightforums.com/tutorials/2808-take-ownership-file-folder-drive-registry-key-windows-8-a.html 10/15

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

Page 11: Take Ownership of a File, Folder, Drive, Or Registry Key in Windows 8

5/1/2014 Take Ownership of a File, Folder, Drive, or Registry Key in Windows 8

http://www.eightforums.com/tutorials/2808-take-ownership-file-folder-drive-registry-key-windows-8-a.html 11/15

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

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

Note

If you wanted to set the Administrators group as the owner, then type Administrators in the "Enter theobject 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 toselect" box, and go to step 10 below instead.

NT SERVICE\TrustedInstaller

Page 12: Take Ownership of a File, Folder, Drive, Or Registry Key in Windows 8

5/1/2014 Take Ownership of a File, Folder, Drive, or Registry Key in Windows 8

http://www.eightforums.com/tutorials/2808-take-ownership-file-folder-drive-registry-key-windows-8-a.html 12/15

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

Page 13: Take Ownership of a File, Folder, Drive, Or Registry Key in Windows 8

5/1/2014 Take Ownership of a File, Folder, Drive, or Registry Key in Windows 8

http://www.eightforums.com/tutorials/2808-take-ownership-file-folder-drive-registry-key-windows-8-a.html 13/15

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

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

Page 14: Take Ownership of a File, Folder, Drive, Or Registry Key in Windows 8

5/1/2014 Take Ownership of a File, Folder, Drive, or Registry Key in Windows 8

http://www.eightforums.com/tutorials/2808-take-ownership-file-folder-drive-registry-key-windows-8-a.html 14/15

11. If this is a folder, drive, or registry key, then you will also have the option to checkthe Replace owner of subcontainers and objects box to also change the ownership of thefolder/drive contents or registry key subkeys as well if you like. (see screenshot below)NOTE: A file will not have this option available.

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

Page 15: Take Ownership of a File, Folder, Drive, Or Registry Key in Windows 8

5/1/2014 Take Ownership of a File, Folder, Drive, or Registry Key in Windows 8

http://www.eightforums.com/tutorials/2808-take-ownership-file-folder-drive-registry-key-windows-8-a.html 15/15

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

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