在 cpanel 中出现关于 htaccess 权限的错误

getting error in cpanel regarding htacess permission

我在 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

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

有什么解决办法吗?

cPanel 帐户中的文件应具有 644 的权限,理想情况下为 640755 是文件夹而非文件的权限(除非您需要文件具有执行权限),而 .htaccess 文件则不是。

一般来说,在 /home/cpaneluser:

的 cPanel 服务器上
public_html should have permissions as 750 and ownership as cpaneluser:nobody

public_html 文件夹中的所有文件的所有权应为 cpaneluser:cpaneluser,文件夹的权限应为 [​​=20=]750文件 640

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