【已解决】【Apache】search permissions are missing on a component of the path

环境

CentOS Linux release 7.6.1810

出现问题

Apache虚拟主机目录不能在浏览器中访问。查看error_log,显示以下错误信息:

[Sun Aug 18 19:22:01.491463 2019] [core:error] [pid 12464] (13)Permission denied: [client 192.168.2.235:49675] AH00035: access to /index.html denied (filesystem path '/data/www/index.html') because search permissions are missing on a component of the path

解决问题 

1、确认httpd.conf中虚拟主机目录和权限配置无误。(修改后,记得重启服务哦)
2、确认本地的主机的完整目录都给予了执行权限。
3、执行上述操作后,问题依然存在。
4、执行命令:setenforce 0
5、问题解决。
6、修改/etc/selinux/config文件如下:

# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#     enforcing - SELinux security policy is enforced.
#     permissive - SELinux prints warnings instead of enforcing.
#     disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of three values:
#     targeted - Targeted processes are protected,
#     minimum - Modification of targeted policy. Only selected processes are protected. 
#     mls - Multi Level Security protection.
SELINUXTYPE=targeted

你可能感兴趣的:(发现问题)