11 Mar 2022 02:43 PM - last edited on 17 May 2023 10:54 AM by Michal_Gebacki
How do I access the host file system in OneAgent extension?
I am trying to pass cert and key to a request and I get error 13. I tried tempfile.TemporaryFile() and tempfile.NamedTemporaryFile() they did work either. Bytes not supported and permission denied respectively.
How do I read from a file or pass the file path to request?
Solved! Go to Solution.
11 Mar 2022 03:41 PM
The file needs to be readable by the user that executes the extension. For Linux this means dtuser, for Windows this means Local Service.
For temp files we've got extensions running on thousands of servers that use:
tempfile.gettempdir()
as the root dir for storing files, and that always worked.