Server cannot read nagios.cfg


I have installed Nagios 3.2.0 on Ubuntu 8.04 and had it working with 2 hosts added. I have split the split the .cfg files in the following way:

|_etc |_objects |_linuxhosts |_printers |_routers |_servers |_switches
The nagios.cfg file has cfg_dir= entries for each directory. I created an objects/hostgroups.cfg file with the host group definations and added an entry in nagios.cfg for it. I also moved the localhost.cfg to the linuxhosts directory ad added config files for 2 Windows servers to the servers directory. I then did a “/etc/init.d/nagios restart” and Nagios restarted and I was able to log in from the browser and see the data and map.

But when I added more Windows server .cfg files and restarted Nagios again, I get the following error: Error: Cannot open main configuration file ‘/usr/nagios/nagios.cfg’ for reading! Error processing the main config file!

The file is owned by nagios:nagios and is chmoded to 664. It opens fine in nano. I had not made any changes to nagios.cfg between it working and adding the new host .cfg files. I removed them and still get the same error.

Anyone have any ideas on this?



the only doubt i get is: is the file in the correct directory reported by the error?
i.e. is it /usr/nagios/nagios.cfg or /usr/nagios/etc/objects/nagios.cfg ?