var rule = new FileSystemAccessRule( "Everyone", FileSystemRights.FullControl, InheritanceFlags.ContainerInherit | InheritanceFlags.ObjectInherit, PropagationFlags.None, AccessControlType.Allow); DirectorySecurity security = new DirectorySecurity(); security.SetAccessRule(rule); Directory.SetAccessControl(@"A:新建文件夹", security);