Removing the "Inherit permissions from parent" from an NTFS folder using System.Security.AccessControl -
03-15-2007
, 04:02 AM
Hello,
I am trying to remove all the ACEs present on a local NTFS folder
using C# -> System.Security.AccessControl.
What I want is just to remove any permission (inherited or explicit)
present on that particular folder and replace those permissions with
access permissions of my own.
I am the administrator of this system so there should not be any
problem while doing this regarding "access denied" errors.
I got the "removing explicit users" part correctly but the inherited
permissions just won't go away unless I uncheck the box myself and
then run the code.
(I already know who has the permissions on that particular folder)
Can anyone tell me how to "uncheck" the box by C# code? (Using
System.Security.AccessControl or by any other way?)
Thanks. |