G
Guest
i have read internet and publish manuals.
i'm not able to get FileSystemRighs in C# to present to me all the
permissions so that i can display, capture and compare. when i do a
console.writeline({0}, rule.FileSystemRighs); i get a simple line:
Read&Execute.
yet if i step through the code i will get maybe 4 or more values. so the
question is how do i work with FileSystemRights to capture the complete
permissions string for me to do what ever to?
here is a sample of code:
static void PrintACE(FileSystemAccessRule rule)
{
Console.WriteLine("{0} {1} to {2} ({3})",
AccessControlType.Allow == rule.AccessControlType ? "Grant"
: "Deny",
rule.FileSystemRights,
rule.IdentityReference,
rule.IsInherited ? "Inherited" : "Direct");
}
here is the output of one user:
ReadAndExecute, Synchronize
what i see in debug mode:
rule.FileSystemRights = ReadData | ReadExtendedAttributes | ExecuteFile |
ReadAttributes | ReadPermissions | Synchronize
thanks.
herb
i'm not able to get FileSystemRighs in C# to present to me all the
permissions so that i can display, capture and compare. when i do a
console.writeline({0}, rule.FileSystemRighs); i get a simple line:
Read&Execute.
yet if i step through the code i will get maybe 4 or more values. so the
question is how do i work with FileSystemRights to capture the complete
permissions string for me to do what ever to?
here is a sample of code:
static void PrintACE(FileSystemAccessRule rule)
{
Console.WriteLine("{0} {1} to {2} ({3})",
AccessControlType.Allow == rule.AccessControlType ? "Grant"
: "Deny",
rule.FileSystemRights,
rule.IdentityReference,
rule.IsInherited ? "Inherited" : "Direct");
}
here is the output of one user:
ReadAndExecute, Synchronize
what i see in debug mode:
rule.FileSystemRights = ReadData | ReadExtendedAttributes | ExecuteFile |
ReadAttributes | ReadPermissions | Synchronize
thanks.
herb