Run ncpa with noexec on /tmp

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Post Reply
sgomeztd
Posts: 51
Joined: Tue Apr 30, 2019 11:00 am

Run ncpa with noexec on /tmp

Post 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?
User avatar
jmichaelson
Posts: 375
Joined: Wed Aug 23, 2023 1:02 pm

Re: Run ncpa with noexec on /tmp

Post 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.
Please let us know if you have any other questions or concerns.

-Jason
sgomeztd
Posts: 51
Joined: Tue Apr 30, 2019 11:00 am

Re: Run ncpa with noexec on /tmp

Post 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
Post Reply