Continuing from my last post, the same can be achieved using SetAccessRuleProtection as shown below: using System;using System.Collections.Generic;... System.Text;using System.Security.AccessContr... System.IO;using System.Security.Principal; namespace AceInheritRemove{ class Program { static void Main(string[] args) { // Get the object and its SecDescp DirectoryInfo dir = new DirectoryInfo("e:\\kgk\\tes... DirectorySecurity sec = dir.GetAccessControl(Access... sec.SetAccessRuleProtection...
.NET Framework 2.0 ("Whidbey") has introduced a new set of classes in the Framework Class Library (FCL) that allows you to work with the NTFS Access Control Lists. You can get object owners, security descriptors, create security descriptors, and much more. All of this resides under the System.Security.AccessControl namespace. Below is a snippet that exemplifies how to use it. Scenario: You need to create a child folder without the permissions inherited by the parent folder, but with only permissions...