【已解决】【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

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

wingrez

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值