You should be able to interpret the returned permissions contained in an ACE for a file by referring to
File Access Rights Constants and Standard Access Rights. Also, you should be able to find these in the Windows header files (winnt.h).
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hello,
I'm trying , by using Win32 API on C langage , to retrieve owner and permissions of a file .Retrieving onwer is O.K.
Concerning retrieving file permissions , I'm able to list the 5 ACEs related to the security descriptor of the file.
The DACL has 5 ACEs with these values:
user james mask 0x1f01ff
user Utilisateurs authentifies mask 0x1301bf
user System mask 0x1f01ff
user Administrateurs mask 0x1f01ff
user Utilisateurs mask 0x1200a9
I'm not able to decode these mask values to retrieve permissions as cacls is able to do.
Answer of cacls for this file are correct :
cacls c:\tmp\myfile.txt
TITO\james:F
AUTORITE NT\Utilisateurs authentifiés:(ID)C
AUTORITE NT\Système:(ID)F
BUILTIN\Administrateurs:(ID)F
BUILTIN\Utilisateurs:(ID)R
Any help is welcome.
Thx.
You should be able to interpret the returned permissions contained in an ACE for a file by referring to
File Access Rights Constants and Standard Access Rights. Also, you should be able to find these in the Windows header files (winnt.h).