gacvd 发表于 2019-1-16 09:30:52

nagios安装配置(七):Web界面手动发送邮件报错

  今天升级了下nagios,发现在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

  如果你手动修改过nagios中的rw目录的权限,可以使用下面命令恢复默认权限


[*]cd /usr/local/src/nagios
[*]make install-commandmode
[*]# 它执行以下命令
[*]/usr/bin/install -c -m 775 -o nagios -g nagcmd -d /usr/local/nagios/var/rw
[*]chmod g+s /usr/local/nagios/var/rw

  官网提供的解决方法地址:http://nagios.manubulon.com/traduction/docs25en/commandfile.html
  如果按照手册的操作就是make install-commandmode是不行的,还是需要将rw目录的其他用户权限改为7
  解决方法:


[*]chmod o+rwx /usr/local/nagios/var/rw

  nagios需要停止然后开启才会生效



页: [1]
查看完整版本: nagios安装配置(七):Web界面手动发送邮件报错