现在我已经复制并粘贴了我之前在 Windows 7 上创建的自己的 Web 文件。该gksudo nautilus命令确实帮助我将该 Web 文件复制到/opt/lampp/htdocs目录中。现在我在目录中有我的 web 文件,当我尝试通过在浏览器中浏览它来访问它时,它localhost/mywebfile会弹出这样的Access forbidden!错误
Access forbidden!
You don't have permission to access the requested object. It is either read-protected or not readable by the server.
If you think this is a server error, please contact the webmaster.
Error 403
localhost
Apache/2.4.3 (Unix) OpenSSL/1.0.1c PHP/5.4.7
Run Code Online (Sandbox Code Playgroud)
我也无法访问我刚刚复制到 /opt/lampp/htdocs 目录的那个文件夹。错误说:-
This location could not be displayed. You do not have the permissions necessary to view the contents of “mywebfiles”.
Run Code Online (Sandbox Code Playgroud)
这是由于权限问题。为避免此错误更改权限,如图所示。
只需按键盘上的Ctrl+ Alt+T即可打开终端。当它打开时,运行以下命令:
sudo chmod -R 0777 /opt/lampp/htdocs/mywebfile
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2313 次 |
| 最近记录: |