|
security
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Directory SecurityCan anyone point in the direction of a good reference, using VB.Net, for
working with directory security? My code has located a directory that has inherited access rights form a parent directory. I want to programmatically turn off the inheritance from above, completely remove all existing access rights and then replace them with a new set of access rights for various accounts. I want these new rights to be inherited downwards to all child directories and files. Any help is appreciated. -- Colin Halliday Hi Colin,
I had the same question did it like this: ' Imports System.Security.AccessControl Dim security As New DirectorySecurity ' protect the rules from inheriting the parent's security settings security.SetAccessRuleProtection(True, False) ' turn of ineritance, do not keep current settings ' Persist the changes System.IO.Directory.SetAccessControl("D:\test\testdir", security) As far as i know .NET Framework version 2.0 is needed. This article was helpfull for me: http://msdn.microsoft.com/msdnmag/issues/04/11/AccessControlinNET/ Regards, Arjan Show quoteHide quote "Colin Halliday" <kothesit@newsgroup.nospam> wrote in message news:ed6OtY5rGHA.356@TK2MSFTNGP05.phx.gbl... > Can anyone point in the direction of a good reference, using VB.Net, for > working with directory security? > > My code has located a directory that has inherited access rights form a > parent directory. I want to programmatically turn off the inheritance > from above, completely remove all existing access rights and then replace > them with a new set of access rights for various accounts. I want these > new rights to be inherited downwards to all child directories and files. > > Any help is appreciated. > > -- > Colin Halliday >
Dotnet 2.0 PCKS CheckSignature Error
What permission do I need to add a user to a group? (C#) Prevent others from using my class libraries Decryptionfailed to bring original text back.... What's wrong with my encryption function? Newbie Question - Thanks in Advance... Simple Keyed hash question random passwords Form authentication and files that shouldn'y be authenticated Keyed hash vs Digital signature ???? |
|||||||||||||||||||||||