首页 > 解决方案 > Ubuntu apach2,因为路径的组件上缺少搜索权限

问题描述

“因为路径的组件上缺少搜索权限”似乎是一个不时发生的问题。到目前为止,这里没有建议的解决方案有效,所以我不得不再次询问如果我收到上述错误,我可以检查什么。

namei --modes ./index.html 
f: ./index.html
 drwxr-sr-x .
 -rw-r--r-- index.html

在 Ubuntu 20.04 上

标签: apache2

解决方案


644权限可能会导致问题。将它们设置为755并在必要时重新启动 Apache:

sudo chmod 755 /path/to/source
sudo service apache2 restart

那应该可以解决问题。


推荐阅读