Check result path is not a valid directory‏


Hi all,

I installed Nagios on a 32-bit system (CentOS 5.3) following the directions given here: … n_CentOS_5

Everything went well and I ran nagios -v /etc/nagios/nagios.cfg and got no errors or warnings. But when I tried to start Nagios, it failed.
Checked the log file and it reads:

[1277993818] Error in configuration file ‘/etc/nagios/nagios.cfg’ - Line 466 (Check result path is not a valid directory)
[1277993818] Nagios 3.2.1 starting… (PID=27996)
[1277993818] Local time is Thu Jul 01 10:16:58 EDT 2010
[1277993818] LOG VERSION: 2.0
[1277993818] Bailing out due to one or more errors encountered in the configuration files. Run Nagios from the command line with the -v option to verify your config before restarting. (PID=27996)

Then I opened nagios.cfg file and found this:

I am pretty sure it’s a permission error, but can’t seem to fix it. I tried the followings:

chmod 777 /var/nagios/spool/checkresults
chown -R nagios apache /var/nagios/spool/checkresults

./usermod nagios apache
chown -R apache:nagios checkresults

Here are the permissions of that directory:
[root@localhost ~]# cd /var/nagios/spool/
[root@localhost spool]# ls -l
drwxrwxrwx 2 nagios nagios 4096 Jul 1 10:25 checkresults

[root@localhost var]# cd /var
[root@localhost var]# ls -l
drwxrwxrwx 5 nagios nagios 4096 Jul 1 09:16 nagios

And some more permission commands, but no luck. I would really appreciate it if someone could please help me with this.




I think this is not what you wanted to hear, but i’d recommend to install from source following these instructions:
In the long run it’s the better option as the path and permission problems are relatively well known, while at distribution package level there’s little to do if you don’t get somebody with that exact config…