How to enum access permissions and SIDs.txt

I want to make an enumration with all SIDs or account names in the system.

How can i enumerate permissions by accounts for a specific file/folder ?

I want to make an output like that :

File : c:\a.dat

ACL ACCESS

user1 read write

user2 read

user3 write

Thank you very much.