How to set the owner of a file to SYSTEM?
<p>Code-wise, this is pretty straightforward:</p>

<pre><code>var fs = IO.File.GetAccessControl(path);
fs.SetOwner(new NTAccount("NT AUTHORITY\\SYSTEM"));
IO.File.SetAccessControl(path, fs);
</code></pre>

<p>This throws an exception that says "The security identifier is not allowed to be the owner of this object."</p>

<p>Supposedly this means that I do not have the right to assign this user as the owner: <a href="https://msdn.microsoft.com/en-us/library/ms838297.aspx" rel="nofollow noreferrer">source 1</a>, <a href="https://stackoverflow.com/a/153146/33080">source 2</a>. However, I can very easily use Explorer to set the owner of this file to SYSTEM. Since Explorer can do it somehow, I must have the necessary rights - so how can I do what Explorer does and set a file's owner to SYSTEM?</p>