schubduese
asked on
C# FilesystemRights using System.Security.AccessControl
I wrote a program which retrieves all rights for a specific folder / file using System.Security.AccessCont rol. For all possible file I get the following information:
- AccessControlType
- FileSystemRights
- Trustee
- IsInherited
- Inheritanceflags
- Propagationflags
Here's a possible Output:
<ace>
<trustee>Power Users</trustee>
<access>Allow</access>
<rights>ReadAndExecute, Synchronize</rights>
<inherited>True</inherited >
<inheritanceflags>None</in heritancef lags>
<propagationflags>None</pr opagationf lags>
</ace>
<ace>
<trustee>Power Users</trustee>
<access>Allow</access>
<rights>-1610612736</right s>
<inherited>True</inherited >
<inheritanceflags>Containe rInherit, ObjectInherit</inheritance flags>
<propagationflags>InheritO nly</propa gationflag s>
</ace>
<ace>
<trustee>Power Users</trustee>
<access>Allow</access>
<rights>Modify, Synchronize</rights>
<inherited>True</inherited >
<inheritanceflags>None</in heritancef lags>
<propagationflags>None</pr opagationf lags>
</ace>
<ace>
<trustee>Power Users</trustee>
<access>Allow</access>
<rights>-536805376</rights >
<inherited>True</inherited >
<inheritanceflags>Containe rInherit</ inheritanc eflags>
<propagationflags>InheritO nly</propa gationflag s>
</ace>
Can anyone explain why the rights are sometimes numbers and sometimes words. And how do I convert either the number to words or the words to numbers?
- AccessControlType
- FileSystemRights
- Trustee
- IsInherited
- Inheritanceflags
- Propagationflags
Here's a possible Output:
<ace>
<trustee>Power Users</trustee>
<access>Allow</access>
<rights>ReadAndExecute, Synchronize</rights>
<inherited>True</inherited
<inheritanceflags>None</in
<propagationflags>None</pr
</ace>
<ace>
<trustee>Power Users</trustee>
<access>Allow</access>
<rights>-1610612736</right
<inherited>True</inherited
<inheritanceflags>Containe
<propagationflags>InheritO
</ace>
<ace>
<trustee>Power Users</trustee>
<access>Allow</access>
<rights>Modify, Synchronize</rights>
<inherited>True</inherited
<inheritanceflags>None</in
<propagationflags>None</pr
</ace>
<ace>
<trustee>Power Users</trustee>
<access>Allow</access>
<rights>-536805376</rights
<inherited>True</inherited
<inheritanceflags>Containe
<propagationflags>InheritO
</ace>
Can anyone explain why the rights are sometimes numbers and sometimes words. And how do I convert either the number to words or the words to numbers?
I would think that you are using enumerations, and not designating those enumerations to be flags (or not including the right enumeration values), but that is just a wild guess...
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.