title: Cannot set file owner to NT SERVICE\TrustedInstaller
body: <p>Using explorer I can set the owner of a file I have created to "NT SERVICE\TrustedInstaller" and it does get set. I have verified with DIR /Q.</p>
  
  <p>But when I use the following C# code on Windows 7 SP1 X64 :</p>
  
  <pre><code>FileInfo info = new FileInfo("TrustedFile.txt");
  FileSecurity security = info.GetAccessControl();
  NTAccount Sid = new NTAccount("NT SERVICE\\TrustedInstaller");
  security.SetOwner ( Sid );
  info.SetAccessControl( security );
  </code></pre>
  
  <p>I get the following exception, event when running with Administrator privileges.</p>
  
  <pre><code>**System.InvalidOperationException: The security identifier is not allowed to be the owner of this object.**
     at System.Security.AccessControl.NativeObjectSecurity.Persist(String name, SafeHandle handle, AccessControlSections includeSections, Object excepti
  onContext)
     at System.Security.AccessControl.NativeObjectSecurity.Persist(String name, AccessControlSections includeSections, Object exceptionContext)
     at System.Security.AccessControl.NativeObjectSecurity.Persist(String name, AccessControlSections includeSections)
     at System.Security.AccessControl.FileSystemSecurity.Persist(String fullPath)
     at System.IO.File.SetAccessControl(String path, FileSecurity fileSecurity)
     at System.IO.FileInfo.SetAccessControl(FileSecurity fileSecurity)
     at SetFileOwner.Program.Main(String[] args)
  </code></pre>
  
  <p>Any idea what I am doing wrong ?</p>