【问题标题】:getting error in cpanel regarding htacess permission在 cpanel 中出现关于 htaccess 权限的错误
【发布时间】:2021-11-30 04:34:30
【问题描述】:

我在 cpanel 中安装了 wordpress,当我在 cpanel 中的错误日志出现以下错误时。

[Mon Oct 11 16:31:35.856159 2021] [core:crit] [pid 24371] (13)Permission denied: [client 209.141.51.176:39184] AH00529: /home/root123/public_html/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable and that '/home/root123/public_html/' is executable
[Mon Oct 11 13:12:48.427994 2021] [core:crit] [pid 8707] (13)Permission denied: [client 138.68.249.116:52090] AH00529: /home/root123/public_html/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable and that '/home/root123/public_html/' is executable

我在 stackoverflow 上阅读了所有相关答案,他们说这是权限问题。我将此文件 home/root123/public_html/.htaccess 的权限更改为 775,但问题仍然存在。

有什么办法吗?

【问题讨论】:

  • 如果文件的所有者与试图写入或执行它的人匹配,则您不需要弄乱 chmod。但是 775 应该允许任何人读取和执行。父文件夹的权限是什么?
  • 我在 cpanel 中添加了域。 home/root123/ .htaccess 是 644,/home/root123/public_html/.htaccess 是 775,我的域名是 /home/root123/public_html/domain.com/ .htaccess 是 644

标签: php wordpress apache cpanel


【解决方案1】:

cPanel 帐户中的文件应具有 644 的权限,最好是 640755 是文件夹而不是文件的权限(除非您需要文件才能拥有执行权限),而 .htaccess 文件则不然。

一般来说,在 /home/cpaneluser 中的 cPanel 服务器上:

public_html should have permissions as 750 and ownership as cpaneluser:nobody

public_html 文件夹内的所有文件的所有权应为 cpaneluser:cpaneluser,文件夹的权限为 750,文件的权限为 640

因此,您应该检查 public_html 权限以及这些 .htaccess 文件所在的文件夹。

【讨论】:

    猜你喜欢
    • 2019-03-27
    • 2017-12-31
    • 2020-10-11
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-02-24
    • 2020-02-26
    相关资源
    最近更新 更多