【问题标题】:Error 403 on webpage inspite of existing index.html尽管存在 index.html,但网页上出现错误 403
【发布时间】:2016-10-27 17:52:34
【问题描述】:

我正在尝试建立自己的网站,并且我的服务器上有一个名为 public_html 的文件夹,其中包含我的主页 index.html 和其他内容。但是,当我尝试使用任何浏览器访问它时,我收到错误 403。有人知道发生了什么吗?

文件和文件夹权限如下所示。

【问题讨论】:

  • ??两个反对票甚至没有评论。这对 OP 有什么帮助?
  • ^ 正是我的问题:P

标签: html server


【解决方案1】:

错误 403 是权限错误。 index.html 不是二进制文件,所以它应该在没有“x”的情况下工作,但尝试“chmod 744 index.html”(甚至是 777,但只是简单地排除这个问题),这将授予所有者的所有权限(大概是你)并且只为团体和其他人阅读。阅读它并尝试它,但最后,将权限设置为尽可能低的级别,仍然允许您随意使用该文件。

来自用户 Krishan Gopal:

Number  Octal Permission Representation
0       No permission
1       Execute permission
2       Write permission
3       Execute and write permission: 1 (execute) + 2 (write) = 3
4       Read permission
5       Read and execute permission: 4 (read) + 1 (execute) = 5
6       Read and write permission: 4 (read) + 2 (write) = 6
7       All permissions: 4 (read) + 2 (write) + 1 (execute) = 7

【讨论】:

    猜你喜欢
    • 2014-01-08
    • 1970-01-01
    • 1970-01-01
    • 2017-09-14
    • 2023-03-21
    • 1970-01-01
    • 2013-05-12
    • 2019-12-25
    • 2021-09-04
    相关资源
    最近更新 更多