Questions tagged «directory-security»

3
使用C#.NET将“所有人”特权添加到文件夹
我使用下面的代码允许所有人访问文件夹: System.Security.AccessControl.DirectorySecurity sec = System.IO.Directory.GetAccessControl(directory, AccessControlSections.All); FileSystemAccessRule accRule = new FileSystemAccessRule("Everyone", FileSystemRights.Modify, AccessControlType.Allow); sec.AddAccessRule(accRule); // setACL sec.ResetAccessRule(accRule); 现在,将“所有人”用户添加到该文件夹​​中,但是没有分配任何权限。没有选中所有的读取,写入,执行等复选框。
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.