Maybe the below articles from Microsft might help you with the answers you are searching for in the process involved in the Access Control Lists and Getting Information from an ACL.
Access Control Lists
Getting Information from an ACL
Hope this resolves your Query!!
--If the reply is helpful, please Upvote and Accept it as an answer–