I have a server written in C # that uses impersonation.
I would like to know how I can change the security attributes of a file so that any user can delete it.
My server impersonates the user and then creates a temporary file. Later I need to delete the file, but at this moment I no longer impersonate the user who created the file, and when an attempt is made to delete the file, an exception is thrown. My assumption is that while I am creating the file, I should be able to change the security attributes to allow any user to delete the file.
How can I do this (preferably C #, but p / invoke will work too).
I am currently using .NET 1.1, so you can evaluate a method that can be implemented in 1.1.
source share