how to print all groups or usernames for a given folder using c++

104 Views Asked by At

I have some problem. I tried to search solving in the internet, but didn't find them (they didn't work).

The problem is...

For example I have some folder: "directory1", I must get usernames and their permissions regarding this folder..

1

There are 1 best solutions below

4
YangXiaoPo-MSFT On

Finding the Owner of a File Object in C++ example uses the GetSecurityInfo and LookupAccountSid functions to find and print the name of the owner of a file. GetSecurityInfo also can retrieve The primary group of an object, The discretionary access control list (DACL) of an object, The system access control list (SACL) of an object.