4

We have a web farm and are writing temp files for reports. We set up a file share and are using impersonation to write the temporary report files to that share. We gave the account doing the impersonation full control to the share and the folder itself.

The files are writing correctly but are not being deleted. Is there something we're missing with this setup?

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
George
  • 7,864
  • 5
  • 29
  • 25

3 Answers3

1

Not sure what method you are using to write the files. The following is what I ended up doing in order to read files. Maybe you could try this method for deleting them as well.

How can I temporarily impersonate a user to open a file?

Community
  • 1
  • 1
Even Mien
  • 44,393
  • 43
  • 115
  • 119
0

Look at the "access denied" error event in Event Viewer and double-check that the user you expect to be doing the deletion is the actual user.

Bryan
  • 8,748
  • 7
  • 41
  • 62
0

makesure you have closed the file in the procedure you use to write to the files otherwise it will be locked

Richard Banks
  • 2,946
  • 5
  • 34
  • 71