The Linux Level-1 CIS benchmarks set the noexec flag on /tmp. This prevents the agent from being able to execute any scripts (fork/exec /tmp/trmm12345: permission denied)
If the value for this path was a variable (Custom Field) defined at the site or agent level that was an empty string by default, then it would continue to use the default TempDir path, but allow for overrides in circumstances where a different path is needed...
The Linux Level-1 CIS benchmarks set the
noexec
flag on/tmp
. This prevents the agent from being able to execute any scripts (fork/exec /tmp/trmm12345: permission denied
)The
createTmpFile
ofutils.go
is passing a blank string for the dir path toCreateTemp
that is causing the function to use the path as returned byTempDir
. https://pkg.go.dev/os#CreateTemp https://github.com/amidaware/rmmagent/blob/4b1f993a7633c3f69d49cd6ee4ae509c3896d19b/agent/utils.go#L312-L315If the value for this path was a variable (Custom Field) defined at the site or agent level that was an empty string by default, then it would continue to use the default
TempDir
path, but allow for overrides in circumstances where a different path is needed...