Page 1 of 1

Run ncpa with noexec on /tmp

Posted: Fri Apr 11, 2025 3:47 am
by sgomeztd
I have some RHEL7.9 where /tmp is configured with noxec where I'm trying to install the ncpa agent. I tried different version of ncpa3 and even tough they install successfully, the service fail to start with different permission error depending on the version but in 3.0 I finally saw an error clearly saying that it failed to write some temporary file on /tmp

I don't see on the configuration anywhere an option to define a different location for the temporary files, can this be configured anywhere or the only alternative is to do not set noexec into /tmp?

Re: Run ncpa with noexec on /tmp

Posted: Fri Apr 11, 2025 3:56 pm
by jmichaelson
You may have luck adding

Code: Select all

PrivateTmp=true
to /usr/lib/systemd/system/ncpa.service in the [Service] section. then

Code: Select all

systemctl daemon-reload
and

Code: Select all

systemctl restart ncpa
. this will overlay /tmp for the ncpa process with a temporary mount for the life of the process, which will clean up when it terminates.

Re: Run ncpa with noexec on /tmp

Posted: Mon Apr 14, 2025 4:26 am
by sgomeztd
That was a good idea but unfortunately it does not fix the issue at it seems it still trying to write on tmp altough on this agent version 3.0.2 it just provides a random Permission denied error