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



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.

.



Relevant Pages

  • Re: Minimum NTFS Permissions - Theres such a thing???
    ... ?2001 Microsoft Corporation. ... HOW TO: Set Minimum NTFS Permissions Required for IIS 5.0 to Work WGID:198 ... " List Folder Contents" ...
    (microsoft.public.inetserver.iis.security)
  • Re: Unable to delete orphaned 1.5 GB System Restore folder
    ... The fact that the tech support is based in India has nothing to do with the ... If so you may want to leave this folder alone. ... down to all children folders because i can set those permissions to ... try deleting from the command line using system by using the AT ...
    (microsoft.public.windowsxp.security_admin)
  • Re: Unable to delete orphaned 1.5 GB System Restore folder
    ... The only computers i fix are my own. ... If so you may want to leave this folder alone. ... it includes all subdirectories with inherited permissions. ... try deleting from the command line using system by using the AT ...
    (microsoft.public.windowsxp.security_admin)
  • RE: no OWA
    ... have the correct permissions was the "inetpub" folder. ... Correct the settings in IIS: ... click to check the "Hide All Microsoft Services" ...
    (microsoft.public.windows.server.sbs)
  • Re: Word mail merge data source
    ... "Peter Jamieson" wrote: ... Word on it) then there may be a problem if the folder containing the data ... Word builds a connection string. ... superset of other users' permissions - for example, ...
    (microsoft.public.word.vba.general)