zabbix版本:zabbix_server (Zabbix) 4.0.0alpha8
查看错误日志文件:/etc/httpd/logs/error_log
[Sat Aug 11 11:27:01.659104 2018] [:error] [pid 1180] [client 192.168.27.1:60370] PHP Warning: require_once(/etc/zabbix/web/maintenance.inc.php): failed to open stream: Permission denied in /usr/share/zabbix/include/classes/core/ZBase.php on line 272
[Sat Aug 11 11:27:01.659132 2018] [:error] [pid 1180] [client 192.168.27.1:60370] PHP Fatal error: require_once(): Failed opening required '/etc/zabbix/web/maintenance.inc.php' (include_path='.:/usr/share/pear:/usr/share/php') in /usr/share/zabbix/include/classes/core/ZBase.php on line 272
[Sat Aug 11 11:56:31.600675 2018] [:error] [pid 1178] [client 192.168.27.1:61098] PHP Warning: require_once(/etc/zabbix/web/maintenance.inc.php): failed to open stream: Permission denied in /usr/share/zabbix/include/classes/core/ZBase.php on line 272
[Sat Aug 11 11:56:31.600730 2018] [:error] [pid 1178] [client 192.168.27.1:61098] PHP Fatal error: require_once(): Failed opening required '/etc/zabbix/web/maintenance.inc.php' (include_path='.:/usr/share/pear:/usr/share/php') in /usr/share/zabbix/include/classes/core/ZBase.php on line 272
[Sat Aug 11 11:57:01.649970 2018] [:error] [pid 1179] [client 192.168.27.1:61102] PHP Warning: require_once(/etc/zabbix/web/maintenance.inc.php): failed to open stream: Permission denied in /usr/share/zabbix/include/classes/core/ZBase.php on line 272
[Sat Aug 11 11:57:01.650000 2018] [:error] [pid 1179] [client 192.168.27.1:61102] PHP Fatal error: require_once(): Failed opening required '/etc/zabbix/web/maintenance.inc.php' (include_path='.:/usr/share/pear:/usr/share/php') in /usr/share/zabbix/include/classes/core/ZBase.php on line 272
原因是php由APACHE启动,/etc/zabbix/web目录权限如下,所以导致apache无进入这个目录的权限。
[root@zabbix ]# ll /etc/zabbix/web
总用量 8
-rwxr-xr-x. 1 zabbix zabbix 1036 2月 27 17:23 maintenance.inc.php
-rwxr-xr-x. 1 zabbix zabbix 424 4月 12 16:10 zabbix.conf.php
修改一下属主:
[root@zabbix]# chown apache.apache -R /etc/zabbix/web