| Previous | Next |
| ERROR_REVISION_MISMATCH | ERROR_INVALID_PRIMARY_GROUP |
ERROR_INVALID_OWNER
ERROR_INVALID_OWNER (1307, 0x0000051B) means that the SID supplied as the owner of a securable object is not permitted to become that object's owner in the current security context.
Owner assignment is restricted
When setting ownership through SetSecurityInfo or SetNamedSecurityInfo, Windows does not accept an arbitrary account SID merely because it is syntactically valid. Without SeRestorePrivilege, the owner SID must be contained in the caller's token and must be marked as an owner-capable group. The caller also needs suitable access to the object or the relevant ownership privilege.
Practical checks
- Verify that the intended SID is the one actually resolved for the account or group.
- Inspect the effective token, including its groups and privileges, rather than only the process account name.
- Check whether the code is running under an impersonated client token instead of the service or process token.
- Use restore or ownership privileges only where the operation genuinely requires them; do not replace the requested owner with an unrelated SID merely to bypass the error.
See Microsoft documentation for SetNamedSecurityInfo and SetSecurityInfo.
Looking for a different code? Search another status or error code.