cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Access Host file system in One Agent Extension

motdde
Participant

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?

2 REPLIES 2

Mike_L
Dynatrace Champion
Dynatrace Champion

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.

Thanks @Mike_L,

 

I'll try your suggestions and get back to you.