You can use AccessEnum from Microsoft to get the granted permissions on any folder with it's sub folder.
http://technet.microsoft.com/en-us/sysinternals/bb897332.aspxFor network share, u can use ShareEnum for the same.
http://technet.microsoft.com/en-us/sysinternals/bb897442.aspxThanks
Saugata