title: Problem setting file system access rule
body: <p>In my app on local network, any user should create a directory on shared folder using this code. test1 is the name of one of the user's folder for example.</p>
  
  <pre><code>DirectoryInfo di = new DirectoryInfo(@"\\Server\Test\test1");
  DirectorySecurity ds=new DirectorySecurity();
  ds.SetAccessRule(new FileSystemAccessRule(Enviroment.Username,
                         FileSystemRights.FullControl, AccessControlType.Deny)); 
  di.Create(ds);
  </code></pre>
  
  <p>Now when the admin in domain wants to read every directory from any user this error ocurred:</p>
  
  <blockquote>
    <p>Attempted to perform an unauthorized operation</p>
  </blockquote>
  
  <p>The code that the admin runs is:</p>
  
  <pre><code>DirectoryInfo di = new DirectoryInfo(@"\\Server\Test\test1");
  DirectorySecurity ds=new DirectorySecurity();
  ds.SetAccessRule(new FileSystemAccessRule(Enviroment.Username,
                         FileSystemRights.FullControl, AccessControlType.Allow)); 
  di.SetAccessControl(ds);
  </code></pre>
  
  <p>Where is my mistake?<br>
  Thanks in advance.</p>