Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
// full path to directory where temp scratch files can be written
// NOTE: the Apache user need to be able create files here, and the Nagios user needs to read/delete those same files, so the /tmp system directory won't work (it has a sticky bit on it)
$cfg["tmp_dir"]="/usr/local/nagios4/var/tmp";
and writing to /tmp. And since it can't delete from /tmp, /tmp is filling up.
I've checked the permissions on /usr/local/nagios4/var/tmp and it is writable by the nrdp user. Is there some other setting I need to be checking for?
I cleaned out all Apache files in /tmp that are over a day old and now I don't see any of the nrdp files. NRDP seems to be working fine (everything is updating).
Do the files get read and deleted by NRDP so fast that I would never see them in an ls? I keep doing an ls on /usr/local/nagios4/var/tmp and I don't see any files ever, so I'm not 100% sure what's going on ... but it looks like the problem went away some time this weekend.
Creates a file with a unique filename, with access permission set to 0600, in the specified directory. If the directory does not exist, tempnam() may generate a file in the system's temporary directory, and return the full path to that file, including its name.
So it is possible that the files were created before this directory existed or the permissions were fixed.
oddly, the only change I made to the permissions on /usr/local/nagios4/var/tmp was to remove the write permission from other. So it went from 777 to 775. But whatever fixed it, I'm fine with that.