Home All Groups Group Topic Archive Search About

Replacing NTFS permissions on all child objects

Author
5 Apr 2006 11:47 AM
Roshan
Hi,

In NTFS all folders/container objects have an option called 'Replace
permission entries on all child objects with entries shown here that
apply to child objects'

As I understand this option replaces all explicitly configured and
inherited ACEs on all child objects of the folder with the ACEs of that
folder.

I don't see any option in the DirectorySecurity class to achieve this
functionality.
Does this mean that I must use Directory.GetFileSystemEntries() method
to traverse all the child objects, grandchild objects and so on and
explicilty set rights on them. This seems very ineffecient. Is there
any API to do this?

Any help is greatly appreciated

Thanks,
Roshan

Author
5 Apr 2006 1:46 PM
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.



Show quote
"Roshan" <bros***@gmail.com> wrote in message
news:1144237648.242042.224510@j33g2000cwa.googlegroups.com...
> Hi,
>
> In NTFS all folders/container objects have an option called 'Replace
> permission entries on all child objects with entries shown here that
> apply to child objects'
>
> As I understand this option replaces all explicitly configured and
> inherited ACEs on all child objects of the folder with the ACEs of that
> folder.
>
> I don't see any option in the DirectorySecurity class to achieve this
> functionality.
> Does this mean that I must use Directory.GetFileSystemEntries() method
> to traverse all the child objects, grandchild objects and so on and
> explicilty set rights on them. This seems very ineffecient. Is there
> any API to do this?
>
> Any help is greatly appreciated
>
> Thanks,
> Roshan
>

AddThis Social Bookmark Button