using System.Runtime.InteropServices; //DllImport "kernel32.dll", "advapi32.dll" ...
....
[DllImport("advapi32.dll")]
private static extern bool LogonUser(
String lpszUsername,
String lpszDomain,
String lpszPassword,
int dwLogonType,
int dwLogonProvider,
ref IntPtr phToken
);
There are a lot of functions to deal with that.
GetAclInformation()
GetAce()
DeleteAce()
GetFileSecurity()
....