Programmatically configuring ACE/ACL Permissions using .NET 2.0

Rick Strahl has posted a good example on his blog about how to programmatically configure ACLs and permissions for things like files and directories using the new .NET 2.0 filesystemaccess APIs.  Worth taking a look if you are looking to automate the setup of ACL permissions as part of a setup script/program.

Hope this helps,

Scott

 

Published Wednesday, January 04, 2006 1:43 PM by ScottGu

Comments

# re: Programmatically configuring ACE/ACL Permissions using .NET 2.0

Wednesday, January 04, 2006 7:51 PM by Ohad israeli
You can also download the Access Control Example from VS 2005 & The Mad Hacker (The 12.12.2005 VS 2005 Launch event show)

http://weblogs.asp.net/israelio/archive/2005/12/13/433025.aspx

# re: Programmatically configuring ACE/ACL Permissions using .NET 2.0

Thursday, January 05, 2006 6:45 AM by Gaurav Khanna
Pointers to two posts I made that describe:

1) You need to create a child folder without the permissions inherited by the parent folder, but with only permissions explicitly set on the parent folder

Its at http://geekswithblogs.net/khanna/archive/2005/07/12/46033.aspx

2) How (1) can be done using SetAccessRuleProtection

Its at http://geekswithblogs.net/khanna/archive/2005/07/12/46046.aspx