在启用SELinux的centos 7的Drupal中使用index.php 403

我试图在Centos上安装Drupal,我已经configuration了我的服务器(安装httpd,mysql,php等),一切都看起来不错,直到最后一部分:打url安装Drupal

这里的问题是一旦我打的url / IP addr它返回我403禁止。

但它是奇怪的,因为我把phpinfo.php在相同的组,拥有者和权限相同的文件夹,我可以看到页面…

任何想法可能出错?

编辑:httpd错误日志:

[Thu Nov 12 01:43:38.757390 2015] [core:error] [pid 2600](13)Permission denied:[client 192.168.yy.xx:53408] AH00035:access to /index.php denied(filesystem path' var / www / html / index.php'),因为path的组件上缺lesssearch权限

好吧,我发现这里的问题,这是因为selinux启用。 我做了setenforce 0 ,它的工作原理…但是不pipe怎样使selinux启用这个工作( setenforce 1)

谢谢!

你可以通过运行chcon -R -t httpd_sys_content_t /var/www/html/myDrupal来解决这个chcon -R -t httpd_sys_content_t /var/www/html/myDrupal 。 更改/var/www/html/myDrupal以匹配安装位置。

并加上这个为Drupal的完整解决scheme

 chcon -t httpd_sys_content_rw_t sites/default/ chcon -t httpd_sys_content_rw_t sites/default/settings.php chcon -t httpd_sys_content_rw_t sites/default/files