分享

Error: Could not open command file '/opt/nagi...

 beidouxingstar 2011-07-05
                              Error: Could not open command file '/opt/nagios/var/rw/nagios.cmd' for update!
 
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
无论怎么重启,都没问题

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多