In some cases, the Windows operating system prevents you from doing any operation on certain files and folders. It can be a system file or folder, or one which was created by a user account that no longer exists. 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". By adding a special context menu command, you will be able to see the owner of a file or a folder quickly.
The owner of a file a folder can manage permissions for other user accounts, e.g. allow or deny read or write access. By default, the owner is the entity which created the object. The owner can always change permissions on an object, even when denied all access to the object. Also, members of the Administrators group are given the Take ownership of files or other objects user right.
Ownership can be transferred in the following ways:
The current owner can grant the Take ownership permission to another user if that user is a member of a group defined in the current owner's access token. The user must actually take ownership to complete the transfer.
- An administrator can take ownership.
Let's see how to add a View Owner context menu to File Explorer in Windows 10. Before proceeding, ensure that your user account has administrative privileges. Now, follow the instructions below.
To add View Owner Context Menu in Windows 10, do the following.
- 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_View_Owner_context_menu.reg file to merge it.
- To remove the entry from the context menu, use the provided file Remove_View_Owner_context_menu.reg.
You are done!
The result will be as follows.
How it works
The context menu entry executes the PowerShell cmdlet Get-ACL. The cmdlet gets objects that represent the security descriptor of a file or resource. The security descriptor contains the access control lists (ACLs) of the resource. The ACL specifies the permissions that users and user groups have to access the resource. The ownership information is also available in ACL. To extract it and get rid if the extra details, we can combine the output of the Get-ACL cmdlet with another cmdlet, Format-List. The final command looks as follows:
Get-ACL path-to-your-file| Format-List -Property Owner