"This folder, subfolders and files" 的 C# AddAccessRule
C# AddAccessRule for "This folder, subfolders and files"
我有一些代码可以将权限应用到一个有效的文件夹,但它将文件夹权限设置为 'Special' 并将其应用为 "This Folder and Files" 我需要将其应用为 [=15] =].我做错了什么?
dSecurity.AddAccessRule(new FileSystemAccessRule(@"DOMAIN\" + Account, FileSystemRights.ReadAndExecute, InheritanceFlags.ContainerInherit | InheritanceFlags.ObjectInherit, PropagationFlags.InheritOnly, ControlType));
尝试将其拆分成两条规则;
dSecurity.AddAccessRule(new FileSystemAccessRule(@"DOMAIN\" + Account, FileSystemRights.ReadAndExecute, InheritanceFlags.ContainerInherit, PropagationFlags.InheritOnly, ControlType));
dSecurity.AddAccessRule(new FileSystemAccessRule(@"DOMAIN\" + Account, FileSystemRights.ReadAndExecute, InheritanceFlags.ObjectInherit, PropagationFlags.InheritOnly, ControlType));
我有一些代码可以将权限应用到一个有效的文件夹,但它将文件夹权限设置为 'Special' 并将其应用为 "This Folder and Files" 我需要将其应用为 [=15] =].我做错了什么?
dSecurity.AddAccessRule(new FileSystemAccessRule(@"DOMAIN\" + Account, FileSystemRights.ReadAndExecute, InheritanceFlags.ContainerInherit | InheritanceFlags.ObjectInherit, PropagationFlags.InheritOnly, ControlType));
尝试将其拆分成两条规则;
dSecurity.AddAccessRule(new FileSystemAccessRule(@"DOMAIN\" + Account, FileSystemRights.ReadAndExecute, InheritanceFlags.ContainerInherit, PropagationFlags.InheritOnly, ControlType));
dSecurity.AddAccessRule(new FileSystemAccessRule(@"DOMAIN\" + Account, FileSystemRights.ReadAndExecute, InheritanceFlags.ObjectInherit, PropagationFlags.InheritOnly, ControlType));