After some quality time with Google and MSDN, I came up with the following bit of code. Everything seems to be working fine.
static void Main(string[] args) { DirectoryInfo dInfo = new DirectoryInfo(@"C:\Test\Folder"); DirectorySecurity dSecurity = dInfo.GetAccessControl(); ReplaceAllDescendantPermissionsFromObject(dInfo, dSecurity); } static void ReplaceAllDescendantPermissionsFromObject( DirectoryInfo dInfo, DirectorySecurity dSecurity) {
ccook source share