Gentlement,
following situation. There are files in a network share to which even Administrators have no permissions, permissions are set for two individual users only. In the process of an operation to detect and fix such issues (because this is not desired) I need to add access to the Administrators.
In Windows Explorer that's easy. Since I am an Administrator, I can take the ownership of a file or folder and then edit the security descriptor.
The problem is, that using FileSecurity.GetAccessControl() [or rather FileSecurity.GetAccessControl(AccessControlSections.Owner)] does not work, I am getting an UnauthorizedAccessException.
However I -need- to be able to do this, anyone got a tip? Might P/Invoke be a solution here and if so, how would I do that?
I am confused by this matter, because I thought it should work, since it does work in the Explorer ...
Thanks a bomb! - Chris