Generally speaking; this error is caused by incorrect permissions (read: group ownership) on the overarching directory. You can fix it by..
(This assumes nagios belongs to the group nagcmd)
update group in your nagios cfg before first starting nagios sed -i 's/nagios_group=nagios/nagios_group=nagcmd/' /usr/local/nagios/etc/nagios.cfg
If the directory was already created; either delete it so it will be created with correct group ownership on nagios restart (Assuming nagios.cfg is updated); or manually update it with
This means the the nagios.cmd file doesn't has a permission to execute from the WEB i.e., apache. do the following and restart the Nagios and Apache/httpd /etc/group
Isnt it that every time you restart nagios.. nagios.cmd file is recreated and you will loose this fix....
ReplyDeleteGenerally speaking; this error is caused by incorrect permissions (read: group ownership) on the overarching directory. You can fix it by..
ReplyDelete(This assumes nagios belongs to the group nagcmd)
update group in your nagios cfg before first starting nagios
sed -i 's/nagios_group=nagios/nagios_group=nagcmd/' /usr/local/nagios/etc/nagios.cfg
If the directory was already created; either delete it so it will be created with correct group ownership on nagios restart (Assuming nagios.cfg is updated); or manually update it with
chown nagios.nagcmd /usr/local/nagios/var/rw
Guys,
ReplyDeleteThis means the the nagios.cmd file doesn't has a permission to execute from the WEB i.e., apache. do the following and restart the Nagios and Apache/httpd
/etc/group
nagios:x:500:nagios,apache
nagcmd:x:501:nagios,apache
your are done..