首页 > 解决方案 > 在 Ubuntu 上授予 apache2 读取权限

问题描述

我正在尝试将 Apache2 Web 服务器上的文件夹作为 iframe 中的“索引”类型页面提供服务。我有

<Directory /media/user/Lambda/files/archive>
        Options Indexes
        AllowOverride All
        Require all granted
        Allow from all
</Directory>

Alias /archive /media/user/Lambda/files/archive

在我的 .conf 文件和

<iframe  src="/archive" title=" File Archive"></iframe>

在我的网页上。iframe 中显示的所有内容都是Forbidden 您无权访问此资源。我尝试弄乱 chmod 但我对 Ubuntu 和 Linux 非常缺乏经验,尤其是权限。我已经收集到我需要授予 Apache2 对 /media/user/Lambda/files/archive 的读取权限,但我完全不知道如何做到这一点。

以防万一这很重要,运行 ls -l /media/user/Lambda/files/ 返回:

drwxrwxrwx 1 neon neon 4096 Jun 27 16:05 archive

'neon' 是我在这台计算机上的用户名

标签: htmllinuxubuntuapache2chmod

解决方案


推荐阅读