Sometimes you need to get full access to some file or folder in Windows 10. It can be a system file or folder, or one which was created by a user account that no longer exists. In most cases, the Windows operating system will prevent you from doing any operation on such files and folders. By adding a special context menu, you can quickly get full access to the files and folders.
NTFS is the standard file system of the Windows NT operating system family. Starting with Windows NT 4.0 Service Pack 6, it supported the concept of permissions which can be configured to permit or restrict access to files, folders, and other objects locally and over a network.
By default, almost all system files, system folders and even Registry keys in Windows 10 are owned by a special built-in user account called "TrustedInstaller". Other user accounts are set to only read the files.
As a user accesses each file, folder, registry key, printer, or an Active Directory object, the system checks its permissions. It supports inheritance for an object, e.g. files can inherit permissions from their parent folder. Also every object has an Owner which is the user account that can set ownership and change permissions.
If you are interested in managing NTFS permissions, refer to the following article:
How to take ownership and get full access to files and folders in Windows 10
To save your time, you can add the 'Take Ownership' context menu. This will allow you to become the owner of the files and to instantly grant full access permissions to the files or folders.
Before proceeding, ensure that your user account has administrative privileges. Now, follow the instructions below.
To Add Take Ownership Context Menu in Windows 10
- Download the following ZIP archive: Download ZIP archive.
- Extract its contents to any folder. You can place the files directly to the Desktop.
- Unblock the files.
- Double click on the Add_Take_Ownership_context_menu.reg file to merge it.
- To remove the entry from the context menu, use the provided file Remove_Take_Ownership_context_menu.reg.
You are done!
How it works
The context menu opens a new PowerShell instance as Administrator, and sequentially executes the following commands.
takeown /f
- the command will change ownership for the selected object to the current user account. For directories, it will be executed with the arguments /r /d y
. /r stand for recursive in order to process subfolders. The /d y
argument is the default answer used when the current user does not have the "list folder" permission on a directory.
icacls /grant *S-1-3-4:F
- the command gives the full access permissions to the current owner of the file system object (which is set to your current user account with the previous command). SID: S-1-3-4 is a well-known security identifier that represents the current owner of the object. When an ACE that carries this SID is applied to an object, the system ignores the implicit READ_CONTROL and WRITE_DAC permissions for the object owner.
Change Owner Context Menu
Additionally, you may want to add a Change Owner context menu. Unlike the above, it will allow you to set ownership to one of the pre-defined system accounts.
The context menu allows you to quickly change the owner to one of the following system accounts: the Administrators group, Everyone, SYSTEM, and TrustedInstaller. To learn more about the Change owner context menu, please refer to the following post.
How to Add Change Owner Context Menu in Windows 10
There, you will find ready-to-use Registry files, detailed instructions, and clarifications about how every context menu entry works. This will allow you to change the file, folder, or drive owner with one click.
Related articles:
- How to take ownership and get full access to files and folders in Windows 10
- How to restore the TrustedInstaller ownership in Windows 10
- Backup Permissions For Files and Folders in Windows 10
- Add View Permissions Context Menu in Windows 10
- Add View Owner Context Menu in Windows 10
- RegOwnershipEx 1.0.0.2 is out
- ExecTI – Run Programs as TrustedInstaller
Support us
Winaero greatly relies on your support. You can help the site keep bringing you interesting and useful content and software by using these options:
Hej,
the reg-file works with files, but not with directories – the error is:
Fehler: Ungültige Syntax. Der Wert ‘y’ kann für die Option ‘/d’ nicht verwendet werden.
Any idea?
Greetings from Bodensee
Dieter
It says that it doesn’t support the Y answer.
I see such thing for the first time in my life.
Could you provide the full path to your folder? I would like to try to reproduce the issue locally.
The path is: g:\z_trash
g: is the drive letter for an internal hard drive. g:\ z_trash is a directory with many subdirectories that was created during the parallel installation of Win10 and that is completely locked.
if this text is shown in “german”
Der Wert ‘y’ kann für die Option ‘/d’ nicht verwendet werden
so you have to use a “j” at the end. english = y(es) german =J(a)
takeown /f /r /d j
i am struggeling currently also with this feature ;)
Hey Sergey, Hope this finds you well.
So seams this is not working in Windows 7. Any chance for making it compatible with Windows 7?
Maybe I need to update PowerShell on Windows 7?
Thanks.
Help, I enabled it on WinaeroTweaker and it doesn’t get out even unchecking the option.
DANGER: I had “Take Ownership” screw up my OS when I was not even touching the C:\ drive. The command needs to also include /skipsl on the directory command (/r /d y /skipsl). Resulting in having to do a full system restore.
What happened is I had attached a drive (for example K:\) containing an older OS install, where I needed to scan through and selectively copy off individual files. What happens is the junction points on the OS are not relative to the drive containing the junction (K:\). Instead they link to the current OS drive (C:\). So doing a “Take Ownership” on the ancient OS folder that has a junction inside of it will start recursively changing the C:\ files! Very Bad!
Much worse, the junctions: “K:\ and C:\ProgramData\Application Data” links to C:\ProgramData. So “Take Ownership” on “K:\ProgramData” links to “C:\ which then will resurse infinite depth until the machine crashes.
Please fix Winareo Tweaker to use /skipsl.
I will do.
Every time I enable this tweak, it works while in the current session, but when I restart my PC, it goes away and I have to enable it again. Is there any way to make it stick?