Hello, guys.
Im trying to set owner to file using SetFileSecurity. Well, lets start:
1) I tried to use SetSecurityDescriptorOwner( ,NULL, ) - after SetFileSecurity it returns error 5 (no access). So I got SeTakeOwnershipPrivilege rights and after SFS received error 1338... Invalid security decriptor.... WHY?
2) When I used instead of NULL a SID, taken from MY user name, after SFS I received error 1307 (This sid cant be an owner of this object)...
3) Only when I used "Administrators" group name (BTW, how to get this via CreateWellKnownSid?), it worked...
Please, help me...
Thanks, MBentefor.

Answers
Know the answer? Post it. Somebody with the same question will find it here.