htaccess pcfg_openfile: 无法检查 htaccess 文件,请确保它是可读的并且“/files/domain.com/public_html/images/"是可执行的 [英] htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable and that '/files/domain.com/public_html/images/' is executable

查看:29
本文介绍了htaccess pcfg_openfile: 无法检查 htaccess 文件,请确保它是可读的并且“/files/domain.com/public_html/images/"是可执行的的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

今天我将我的图像从一台服务器迁移到另一台服务器,但遇到了一个奇怪的权限问题

Today i migrated my images from one server to another and faced a strange permission issue

[Mon Mar 25 08:42:23.676315 2013] [core:crit] [pid 15182] (13)Permission denied: [client 24.14.2.22:48113] AH00529: /files/domain.com/public_html/images/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable and that '/files/domain.com/public_html/images/' is executable, referer: http://domain.com.com/file.php

我尝试过的:

    chmod -R 777 root_dir
    restorecon -r
    disable selinux
    Chown -R root:root root_dir

推荐答案

今天我遇到了这个问题.我将 public_html 从旧驱动器转移到新驱动器并像这样 chown:

Today I faced this problem. I transferred public_html from the old drive to new one and chown like this:

chown -R owner:owner public_html

这对于public_html中的子目录和文件是正确的,但是public_html的用户必须是nobody,这样apache才能检查它的内容,所以这解决了我的问题:

This is correct for sub directories and files inside public_html, but the user of public_html must be nobody so apache can check it's content, so this solved my problem:

chown owner:nobody public_html

注意:owner 是用户(例如 web1)

Note: owner is the user (for example web1)

这篇关于htaccess pcfg_openfile: 无法检查 htaccess 文件,请确保它是可读的并且“/files/domain.com/public_html/images/"是可执行的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆