无法给目录添加权限(急)
编写了如下代码:DirectoryInfo dinfo = new DirectoryInfo(str);
if (dinfo.Exists == true)
{
DirectorySecurity dSecurity = dinfo.GetAccessControl();
dSecurity.AddAccessRule(new FileSystemAccessRule("Everyone", FileSystemRights.FullControl, InheritanceFlags.ObjectInherit, PropagationFlags.InheritOnly, AccessControlType.Allow));
dinfo.SetAccessControl(dSecurity);
}
需要为目录创建EveryOne权限 执行程序后,用户组出现EveryOne,但没有添加权限 --------------------编程问答-------------------- up --------------------编程问答-------------------- 在线等回复啊 --------------------编程问答-------------------- 郁闷啊。。。难道没高手在的么?
补充:.NET技术 , C#