`

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

 
阅读更多

nagios登陆正常,但是访问所有的服务出错,检查nagios的配置文件,是正确的

在 /var/log/httpd error_log中发现出现以下错误:

 

[Mon Jul 16 17:29:23 2012] [error] [client 192.168.1.212] (13)Permission denied: exec of '/usr/local/nagios/sbin/status.cgi' failed,
referer: http://192.168.1.217/nagios/side.php
[Mon Jul 16 17:29:23 2012] [error] [client 192.168.1.212] Premature end of script headers: status.cgi, referer: http://192.168.1.217
/nagios/side.php
[Mon Jul 16 17:29:28 2012] [error] [client 192.168.1.212] 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
[Mon Jul 16 17:29:37 2012] [error] [client 192.168.1.212] 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/

分享到:
评论

相关推荐

    ubuntu vps安装docker报错:Cannot connect to the Docker daemon at unix:///var/run/docker.sock.问题解决

    此时,我们可以通过`service docker status`检查Docker守护进程的状态。如果它没有运行,我们可以尝试用`service docker start`启动它,或者使用`systemctl start docker`(对于使用Systemd的系统)来启动Docker服务...

    解决git:fatal:Unable to create”…/.git/index.lock” 的错误

    问题描述: 在使用git 进行提交时, 出现上面这个报错, 导致无法提交. 报错大致意思就是创建index.lock文件失败,因为已经存在index.lock文件了. index.lock文件是在.git下面, 而.git是一般是隐藏的, 那么可以通过以下...

    MySQL中报错:Can’t find file: ‘./mysql/plugin.frm’的解决方法

    在MySQL数据库操作中,有时会遇到“Can't find file: './mysql/plugin.frm'”这样的错误,这通常意味着系统无法找到或访问特定的数据库表文件。这个错误可能由多种原因引起,包括但不限于文件权限问题、数据目录迁移...

    http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd

    Permission to use, copy, modify and distribute the SVG DTD and its accompanying documentation for any purpose and without fee is hereby granted in perpetuity, provided that the above copyright ...

    android 选择图片(从手机照相机或手机图片)

    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/> <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/> ``` 从Android 6.0(API level 23)开始,还需要在...

    arm-2014.05-29-arm-none-linux-gnueabi

    COLLECT_LTO_WRAPPER=d:/eclipse/cross/arm-2014.05-29/bin/../libexec/gcc/arm-none-linux-gnueabi/4.8.3/lto-wrapper.exe Target: arm-none-linux-gnueabi Configured with: /scratch/maciej/arm-linux-2014.05-...

    mysql-5.7.31-macos10.14-x86_64.tar.gz

    - 初始化数据库,通常通过运行安装脚本`./scripts/mysql_install_db`。 - 配置MySQL服务器,修改`my.cnf`配置文件以设置必要的参数,如端口、用户和密码。 - 启动MySQL服务,使用`bin/mysqld_safe --user=mysql &...

    Android中安装asset下的apk

    <uses-permission android:name="android.permission.INSTALL_PACKAGES" /> ``` 3. **环境准备**:本例中,我们将把APK文件从`assets`目录复制到外部存储空间中的特定路径下,并从该路径启动安装流程。 #### 三、...

    MySQL 启动报错:File ./mysql-bin.index not found (Errcode: 13)

    MySQL数据库在启动时可能会遇到各种错误,其中一种常见的报错是"File ./mysql-bin.index not found (Errcode: 13)"。这个错误通常表明MySQL无法找到它的二进制日志索引文件(mysql-bin.index),并且错误代码13通常...

    Apache启动错误Permission denied: httpd: could not open error log file解决方法

    启动 httpd:(13)Permission denied: httpd: could not open error log file /home/wwwroot/jb51.net/logs/error_log. Unable to open logs [失败] 三、问题原因 因为新安装的系统,所以SELinux默认是开启状态,...

    关于在labelme批量转化json文件时PermissionError: [Errno 13] Permission denied: ‘F:/zkx/list_path[i]’的解决

    在使用LabelMe工具进行图像标注工作时,可能会遇到在批量转换JSON文件至图像数据集时出现`PermissionError: [Errno 13] Permission denied`的错误。这个错误通常表明你的程序没有足够的权限来访问或操作指定的文件或...

    详解Nginx 13: Permission denied 解决方案

    2018/07/22 00:46:36 [crit] 15890#15890: *74 connect() to unix:/root/jianshuvue/jianshu.sock failed (13: Permission denied) while connecting to upstream, client: 120.42.13.98, server: jianshu....

    CentOS7_nvidia-docker2安装.rar

    /usr/bin/nvidia-docker: line34: /usr/bin/docker: Permission denied /usr/bin/nvidia-docker: lind34: /usr/bin/docker: Success 等警告,则需要关闭selinux 系统,使用setenforce 0 可临时关闭。

    TestSerial.rar

    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /> <uses-permission android:name="android.permission.READ_PHONE_STATE" /> <uses-permission android:name="android.permission....

    mgc资源--python

    Python是一种高级编程语言,以其简洁明了的语法和强大的功能深受开发者喜爱。在"mgc资源--python"这个主题中,我们聚焦于Python在模拟器开发中的应用。模拟器是一种软件,它能够在一台计算机上复制另一台计算机的...

    hadoop单机配置方法

    将下载的Hadoop压缩包`hadoop-0.20.2.tar.gz`移动到`/usr/local`目录下,命令为`sudo mv /home/dm/hadoop-0.20.2.tar.gz .`. 2. **解压Hadoop** 使用`sudo tar xzf hadoop-0.20.2.tar.gz`命令解压缩Hadoop软件包...

    jre-7u5-linux-i586.tar.gz

    error :/usr/lib/libjvm.so: cannot restore segment prot after reloc: Permission denied . use the command: chcon -t textrel_shlib_t /usr/lib/libjvm.so 这是官方的提示 简单的做法是 setenforce 0 ok,java...

    NDK Camera

    Please reference the [test codes](./android/test/ndcam/). ```console $ gradle connectedAndroidTest # Run test ``` ### Use The following code shows working with `SurfaceView` class. ```java package...

    MYSQL权限不够解决办法

    2. **Error 1142 (42000): SELECT command denied to user 'username'@'hostname' for table 'tablename'** - 解释:用户`username`无法从`tablename`表中选择数据。 3. **Error 1141 (42000): INSERT command ...

    ContentProvider

    android:protectionLevel="normal"></permission> </manifest> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++package com.example.tigongzhe; import android.R.integer; import ...

Global site tag (gtag.js) - Google Analytics