PDA

View Full Version : setting file's owner (W2K)



ficfic
06-04-2002, 09:24 AM
I'm pacing a strange problem :

Using the ACL editor tool of a file (file->properties->security->advanced->owner), I can set the owner of the file to a any vaild user-account.(*)

But from programming using SetSecurityInfo I can only set the owner to logon-session's user or local-administrator, and if I try to set it to a any vaild user-account I get the following error ERROR_INVALID_OWNER, ("This security ID may not be assigned as the owner of this object.").

(*) Suppose I've a shared file a.txt with owner JOHN. I do logon with user DAN and change ownership of a.txt to DAN.
When I'll logon as JOHN I will truly see that the new owner of a.txt is DAN.
OWNER_SECURITY_INFORMATION