Error: Could not open command file '/usr/local/nagios/var/rw/nagios.cmd' for update!

在web界面开启服务状态报警,提示:

Error: Could not open command file '/usr/local/nagios/var/rw/nagios.cmd' for update!  

The permissions on the external command file and/or directory may be incorrect. Read the FAQs on how to setup proper permissions.  

An error occurred while attempting to commit your command for processing.  

Return from whence you came


这个主要是apache 用户 没有执行权限 /usr/local/nagios/var/rw/nagios.cmd 造成,解决方法有几种:

1.在启动nagios的时候给nagios.cmd权限
通过修改nagios的启动脚加入chmod -R 777 $NagiosVarDir/rw

[root@localhost nagios]# vim /etc/init.d/nagios


2.将nagios和apache的用户放到一个组

修改后需要重启apache











安装类别

作原理

说明文字

高亮


你可能感兴趣的:(nagios)