Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Security / March 2007

Tip: Looking for answers? Try searching our database.

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

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Rahul - 15 Mar 2007 09:02 GMT
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.
Rahul - 15 Mar 2007 09:05 GMT
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?

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.