
June 24th, 2009, 10:41 AM
|
|
|
|
AccessControlEntry (ACE) Help
Hey all,
I have a thread going in the C forum but this is probably a better place. I'm developing an application that will allow someone to view all the access permissions on a directory and modify them. This is proving to be very difficult. I have the following code in C#.net 3.5
Code:
// Load directory information
DirectorySecurity myDirectorySecurity = Directory.GetAccessControl(path);
// Obtain the access control list (ACL)
AuthorizationRuleCollection ACL = myDirectorySecurity.GetAccessRules(true, true, typeof(System.Security.Principal.NTAccount));
// Go thru each access control entry (ACE) in the ACL
foreach (AuthorizationRule ACE in ACL)
{
MessageBox.Show(ACE.IdentityReference.ToString());
}
That will show the name of the group/user that has permissions on the directory. However, I cannot access much else. For example, I need to know WHAT permissions each user/group has on the folder but the AuthorizationRule class has no such method. Is there any hope for me? Thanks
|