Article ID: 112884, created on Dec 23, 2013, last review on Aug 12, 2014

  • Applies to:
  • Plesk for Linux/Unix

问题

当尝试访问您的网站时,您会看到 "403 Forbidden" 错误。您可以在 Apache error_log 中看到以下信息:
 
pcfg_openfile: unable to check htaccess file, ensure it is readable.

解决方案

 
2.如果以上 KB 文章没有任何帮助,您将需要了解在哪为 Apache 用户设置了不正确的权限:
 
su - apache -s /bin/bash

-bash-3.2$ cd /var/www/vhosts/<your domain>/httpdocs/
-bash-3.2$ cd /var/www/vhosts/<your domain>/httpdocs/<folder1>/
-bash: cd:/var/www/vhosts/hammasll.fi/httpdocs/<folder1>/ Permission denied
 
基于以上输出,您将需要更改 /var/www/vhosts/hammasll.fi/httpdocs/<folder1>/ 的权限为755 并进一步调查。
 
su - apache -s /bin/bash

-bash-3.2$ cd /var/www/vhosts/<your domain>/httpdocs/
-bash-3.2$ cd /var/www/vhosts/<your domain>/httpdocs/<folder1>/<folder2>/
-bash: cd:/var/www/vhosts/hammasll.fi/httpdocs/<folder1>/<folder2>/ Permission denied
 
然后您将需要再次更改权限。当您能够访问需要的文件夹而没有出现任何 "permission denied" 错误时,该操作才算完成。

29d1e90fd304f01e6420fbe60f66f838 a914db3fdc7a53ddcfd1b2db8f5a1b9c 56797cefb1efc9130f7c48a7d1db0f0c

Email subscription for changes to this article