sweli 发表于 2017-4-20 10:02:27

Permission denied: exec of '/usr/local/nagios/sbin/status.cgi' failed

  nagios登陆正常,但是访问所有的服务出错,检查nagios的配置文件,是正确的
  在 /var/log/httpd error_log中发现出现以下错误:
   (13)Permission denied: exec of '/usr/local/nagios/sbin/status.cgi' failed,
referer: http://192.168.1.217/nagios/side.php
Premature end of script headers: status.cgi, referer: http://192.168.1.217
/nagios/side.php
PHP Warning:date(): It is not safe to rely on the system's timezone sett
ings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those
methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Asia/Chongqing' fo
r 'CST/8.0/no DST' instead in /usr/local/nagios/share/main.php on line 123, referer: http://192.168.1.217/nagios/side.php
PHP Warning:MagpieRSS: Failed to fetch http://www.nagios.org/backend/fee
ds/frontpage/ and cache is off in /usr/local/nagios/share/includes/rss/rss_fetch.inc on line 238, referer: http://192.168.1.217/nagi
os/main.php
  解决方法
  如果是SELinux处于强制安全模式时需要做

  getenforce

  令SELinux处于容许模式

  setenforce 0

  如果要永久性更变它,需要更改/etc/selinux/config里的设置并重启系统。
  不关闭SELinux或是永久性变更它的方法是让CGI模块在SELinux下指定强制目标模式:

  chcon -R -t httpd_sys_content_t /usr/local/nagios/sbin/
chcon -R -t httpd_sys_content_t /usr/local/nagios/share/
页: [1]
查看完整版本: Permission denied: exec of '/usr/local/nagios/sbin/status.cgi' failed