win32security.GetFileSecurity

PySECURITY_DESCRIPTOR = GetFileSecurity(filename, info )

Obtains specified information about the security of a file or directory. The information obtained is constrained by the caller's access rights and privileges.

Parameters

filename : string

The name of the file

info=OWNER_SECURITY_INFORMATION | GROUP_SECURITY_INFORMATION | DACL_SECURITY_INFORMATION | SACL_SECURITY_INFORMATION : int

Flags that specify the information requested.

Comments

This function reportedly will not return the INHERITED_ACE flag on some Windows XP SP1 systems Use GetNamedSecurityInfo if you encounter this problem.