- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
FileInfo file = new FileInfo(fileName);
FileSecurity fSecurity = File.GetAccessControl(fileName);
foreach (FileSystemAccessRule permissions in fSecurity.GetAccessRules(true, true, typeof(NTAccount)))
{
string login = permissions.IdentityReference.Translate(typeof(NTAccount)).Value.ToString();
string permiss = permissions.FileSystemRights.ToString();
if ((login != "логин") && (login != "логин") && (login != "логин"))
{
fSecurity.SetAccessRuleProtection(true, false);
fSecurity.RemoveAccessRule(new FileSystemAccessRule(login, permissions.FileSystemRights, AccessControlType.Allow));
}
fSecurity.AddAccessRule(new FileSystemAccessRule("логин", FileSystemRights.FullControl, AccessControlType.Allow));
fSecurity.AddAccessRule(new FileSystemAccessRule("логин", FileSystemRights.FullControl, AccessControlType.Allow));
}
File.SetAccessControl(fileName, fSecurity);
bormand 03.08.2012 15:18 # +9
Triple login security™
absolut 03.08.2012 15:21 # +2
bormand 03.08.2012 15:31 # 0
Steve_Brown 06.08.2012 10:18 # +2
bormand 06.08.2012 10:34 # +1
USB 07.08.2012 00:01 # 0
Так делал только Стив Джобс. В нормальных фирмах в таких случаях увольняют.
Lure Of Chaos 04.08.2012 11:01 # 0
guest 04.08.2012 11:07 # +3
USB 04.08.2012 18:58 # +4
absolut 04.08.2012 20:27 # +1
eth0 04.08.2012 21:05 # +1