title: Add "Everyone" privilege to folder using C#.NET
body: <p>I have used the code below to allow Everyone access to a folder:</p>
  
  <pre><code>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);
  </code></pre>
  
  <p>Now, the Everyone user is added to the folder, but not with any rights assigned. All the read, write, execute etc. checkboxes are not checked.</p>