Propagate Permissions in ACL in C#

T

tirathankarg

hi,
If you click on a folder and go Advanced Options in Security tab, there
are two options there:
1. Inherit from parent permission entries...
2. Replace permission entries on all child objects...

I want to set the second option of "Replace permission entries..." on
through .net code.

By default whenever a folder is created in .Net, first option of
inhertitance is on.But i want to forcibly propagate parent permissions
to child.

Please tell me how to do it in C#.
 
N

Nicole Calinoiu

AFAIK, there is no Windows API function or .NET Framework method that will
override explicit child ACEs in this way. Unless I've missed something,
you'll need to manually iterate over all child objects, removing any
non-inherited ACEs from each DACL in order to achieve the same effect.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top