Error: Could not open command file '/opt/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.最近nagios出现以上问题, 解决方法: 将nagios和apache放到一个组nagcmd,问题解决 此问题可能与我修改了一次nagios数组有关系 [root@localhost etc]# id nagios uid=607(nagios) gid=605(nagios) groups=605(nagios),607(nagcmd) [root@localhost etc]# id apache uid=48(apache) gid=48(apache) groups=48(apache),607(nagcmd) 另外修改完后,还需要重启一下apache 刚开始修改完毕后。我没有重启apache,还是出现问题。重启后问题解决 还有一个方法是: 手动修改它的权限改成777 /opt/nagios/var/rw/nagios.cmd 重启nagios还要修改权限 还有一个思路是 vim nagios.cfg # NAGIOS GROUP # This determines the effective group that Nagios should run as. # You can either supply a group name or a GID. nagios_group=nagcmd 将这里的nagios的数组改成nagcmd 无论怎么重启,都没问题 |
联系客服