Page 1 of 1

nrdp config file

Posted: Wed Sep 16, 2015 4:57 pm
by jssingh
May I request you change the comments in the nrdp config file? This is what is currently in there:

Code: Select all

// full path to check results spool directory
$cfg["check_results_dir"]="/usr/local/nagios/var/spool/checkresults";

// 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/nagios/var/tmp";
I had set up /usr/local/nagios/var/tmp with the correct permissions and it still was writing to /tmp. I remembered that I had this issue before, so I checked the forums and found my post and it looked like the problem just miraculously fixed itself, which wasn't helpful, so I looked at the code. $cfg["tmp_dir"] is not used anywhere. It is trying to write to $cfg["check_results_dir"]. It turns out I had to set the setuid bit on the permissions.

You should probably get rid of the tmp_dir line altogether because it is not used and therefore it is confusing that it is in there. But at the very least you should move the NOTE comment to the correct variable.

thanks!

Re: nrdp config file

Posted: Wed Sep 16, 2015 5:03 pm
by tmcdonald
Thanks for the tip!

I vaguely remembered something weird with NRDP and directories, but never bothered to document it. I'll add this to our Github Issues tracker for NRPD: https://github.com/NagiosEnterprises/nrdp

Update: Posted https://github.com/NagiosEnterprises/nrdp/issues/5

Closing thread now, thanks again!