=
错误解决方案:php-error-with-zabbix-File(maintenance.inc.php) is not within the allowed path(s)
=
[error] 8150#0: *13 FastCGI sent in stderr: "PHP message: PHP Warning: require_once(): open_basedir restriction in effect. File(/etc/zabbix/web/maintenance.inc.php) is not within the allowed path(s): (/home/wwwroot/default/:/tmp/:/proc/) in /home/wwwroot/default/zabbix/include/classes/core/ZBase.php on line 271
PHP message: PHP Warning: require_once(/etc/zabbix/web/maintenance.inc.php): failed to open stream: Operation not permitted in /home/wwwroot/default/zabbix/include/classes/core/ZBase.php on line 271
PHP message: PHP Fatal error: require_once(): Failed opening required '/etc/zabbix/web/maintenance.inc.php' (include_path='.:/usr/local/php/lib/php') in /home/wwwroot/default/zabbix/include/classes/core/ZBase.php on line 271" while reading response header from upstream, client: 10.2.3.12, server: _, request: "GET /zabbix/ HTTP/1.1", upstream: "fastcgi://unix:/tmp/php-cgi.sock:", host: "192.168.0.12"
2018/04/08 18:41:59 [info] 8150#0: *14 client closed connection while waiting for request, client: 10.2.3.12, server: 0.0.0.0:80
原因排查:
根据nginx的启动线程的权限是www:www,所以我已经修改了zabbix的目录以及/etc/zabbix/web 的目录权限,都是www,这样已经没有了权限问题。
已经重启过了fpm和nginx。
原因分析:根据两点:
1. File(/etc/zabbix/web/maintenance.inc.php) is not within the allowed path(s): (/home/wwwroot/default/:/tmp/:/proc/)
2. PHP Fatal error: require_once(): Failed opening required '/etc/zabbix/web/maintenance.inc.php' (include_path='.:/usr/local/php/lib/php')
推测:应该是某个路径的权限不对。没有权限的原因是 is not within the allowed path(s)
应该去设置某个参数,把这个路径包涵进去。这个参数名应该叫:include_path
解决方法:
寻找php的配置文件php.ini,找到参数include_path 发现没有设置。
那另一个配置在哪里呢?应该在httpd的配置里面或者nginx的配置里面。
由于我本次用了nginx而不是httpd,所以找到nginx里面的配置文件:
vi /usr/local/nginx/conf/fastcgi.conf
fastcgi_param PHP_ADMIN_VALUE "open_basedir=$document_root/:/tmp/:/proc/
加入本次的报错的路径:
fastcgi_param PHP_ADMIN_VALUE "open_basedir=$document_root/:/tmp/:/proc/:/etc/zabbix/web";
重新启动nginx和fastcgi,一切OK了。
/usr/local/nginx/sbin/nginx -s reload
/etc/init.d/php-fpm restart
如果是httpd的,可能可以参考:
=
=
=
相关推荐
2015-01-16: Version 8.039.01: Changed driver code to not use IP checksum hardware offload (caused various issues with networking in VMs) 2015-01-05: Version 8.039.00: Original version
<param-name>cors.allowed.origins</param-name> <param-value>*</param-value> </init-param> <!-- 更多配置选项,如:允许的HTTP方法、允许的头部、是否允许证书等 --> <filter-mapping> <filter-name>...
allowed.headers=Content-Type, Authorization, X-Requested-With allow.credentials=true exposed.headers=X-Total-Count, X-Custom-Header ``` 这里,`allowed.origins`指定了允许跨域的源,`allowed.methods...
<param-name>cors.allowed.origins</param-name> <param-value>*</param-value> </init-param> <init-param> <param-name>cors.allowed.methods</param-name> <param-value>GET,POST,HEAD,OPTIONS,PUT,DELETE...
"allowed_methods": cloudfront.AllowedMethods.ALLOW_ALL, "cached_methods": cloudfront.CachedMethods.CACHE_GET_HEAD_OPTIONS, "default_ttl": core.Duration.minutes(5), }, ) ``` 在上面的例子中,我们...
Prerequisites: Java VM 1.8 Open a command shell/window, browse to where you ...Using the --help option will show the allowed command line arguments. 更多查看: https://github.com/WebGoat/WebGoat
connector's end point moving, the link is breaks if the move was not on one of the flex-controls connection points. Contain False as default. - ADD Added ControlDocRect parameter in event ...
<param-name>cors.allowed.origins</param-name> <param-value>*</param-value> </init-param> <init-param> <param-name>cors.allowed.methods</param-name> <param-value>GET,POST,HEAD,OPTIONS</param-...
在线封装和离线封装驱动 ... Description DECchip 21140 Ethernet driver (This driver allows running ESXi as a VM under Microsoft Hyper-V) ...Build instructions in the above mentioned forums' thread
Check whether unlocking is allowed (1) or not(0). advanced: erase PARTITION Erase a flash partition. format[:FS_TYPE[:SIZE]] PARTITION Format a flash partition. set_active SLOT Set the active ...
设置隐试打开PPT报错 Hiding the application window is not allowed
Download from your IP address is not allowed 百度网盘永久连接: QT下载: qt-opensource-linux-x64-5.8.0.run: 链接:https://pan.baidu.com/s/1sQ3tqPaWdDnmhBYAc_XR7g qt-opensource-linux-x64-5.13.1....
<param-name>cors.config.file</param-name> <param-value>/WEB-INF/cors.properties</param-value> </init-param> ``` 在`cors.properties`文件中,我们可以定义相应的配置: ``` cors.allowed.origins=...
在线封装和离线封装驱动 ... Description ...Adds the blacklisted ESXi 5.1 built-in ...Requires MaintMode Live Install Allowed Live Remove Allowed Stateless Ready Overlay Yes No No Yes No
Causes the next filter in the chain to be invoked, or if the calling filter is the last filter in the chain, causes the resource at the end of the chain to be invoked. doFilter(ServletRequest, ...
port locks up in the Operating System, the error is still reported. - Corrected a bug, where in rare cases, the result summary could be duplicated in a log file. - Updated license management, in ...
--ca-certificate=FILE file with the bundle of CA's. --ca-directory=DIR directory where hash list of CA's is stored. --random-file=FILE file with random data for seeding the SSL PRNG. --egd-file=...
Use the post template feature -located in campaign settings-. For example: {content} <p><a >Link to the original site</a></p> = Why isn’t the full article showing? = Because the feed you're using ...
Please note that this driver is obsolete, because with ESXi 5.5 Update 3 VMware introduced a newer version of e1000e which supports the same set of devices plus Intel i219 adapters (PCI IDs 8086:156f,...
job is shown in the Log tab within the Diskeeper console. Additional information can also be stored in a log file. A wide variety of information can be saved for future reference. Simultaneous ...