HighTechTalks DotNet Forums  

Removing the "Inherit permissions from parent" from an NTFS folder using System.Security.AccessControl

Dotnet Security microsoft.public.dotnet.security


Discuss Removing the "Inherit permissions from parent" from an NTFS folder using System.Security.AccessControl in the Dotnet Security forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Rahul
 
Posts: n/a

Default 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.


Reply With Quote
  #2  
Old   
Rahul
 
Posts: n/a

Default Re: Removing the "Inherit permissions from parent" from an NTFS folder using System.Security.AccessControl - 03-15-2007 , 04:05 AM






Also, is it possible to detect whether the folder is inheriting
permissions from parent or not? i.e. whether the check box is enabled
or not?



Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.