OldxBaser
Programmer
- Nov 5, 2009
- 24
In a VFP program, I am trying to get the file owner using the following APIs:
GetFileSecurity
GetSecurityDescriptorOwner and
LookupAccountSid.
If I run the application on my C: drive, I get Administrator as owner.
If I run it on the network, i get an empty string.
If I copy or move a file using the application, I get right away as owner the person running the application, but after I refresh the folder, the owner goes back to empty string.
The APIs documentation states that :
The information obtained is constrained by the caller's access rights and privileges.
To read the security descriptor of a file or directory, the calling process must have READ_CONTROL access or be the owner of the file or directory.
Can you tell me what exactly this means, and maybe give me an example?
Thanks
GetFileSecurity
GetSecurityDescriptorOwner and
LookupAccountSid.
If I run the application on my C: drive, I get Administrator as owner.
If I run it on the network, i get an empty string.
If I copy or move a file using the application, I get right away as owner the person running the application, but after I refresh the folder, the owner goes back to empty string.
The APIs documentation states that :
The information obtained is constrained by the caller's access rights and privileges.
To read the security descriptor of a file or directory, the calling process must have READ_CONTROL access or be the owner of the file or directory.
Can you tell me what exactly this means, and maybe give me an example?
Thanks