Как изменить права доступа к расшаренной папке?
222 сообщения
#14 лет назад
На c# вот так -не работаетDirectoryInfo dInfo = new DirectoryInfo(@"C:\Data"

DirectorySecurity dSecurity = dInfo.GetAccessControl();
// Add the FileSystemAccessRule to the security settings.
dSecurity.AddAccessRule(new FileSystemAccessRule("Все",
FileSystemRights.Read ,
AccessControlType.Allow));
// Set the new access settings.
dInfo.SetAccessControl(dSecurity);
хотя, код исполняется. да только в самой директории ничего не меняется!