打开本地主机时权限被拒绝 [英] Permission denied when opening localhost

查看:185
本文介绍了打开本地主机时权限被拒绝的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近在Ubuntu中安装了Apache,PHP和MySQL.并将我创建的文件复制到var/www目录.但是,当我打开http://localhost时,它就会显示

I had recently installed Apache, PHP and MySQL in Ubuntu. And copied the files I created to the var/www directory. But when I open http://localhost it is showing

警告:未知:无法打开流:权限在第0行的未知"中被拒绝

Warning: Unknown: failed to open stream: Permission denied in Unknown on line 0

严重错误:未知:无法打开所需的'/var/www/index.php' (include_path ='.:/usr/share/php:/usr/share/pear')在第0行上为未知

Fatal error: Unknown: Failed opening required '/var/www/index.php' (include_path='.:/usr/share/php:/usr/share/pear') in Unknown on line 0

如何正常运行我的项目?在Windows中运行正常.

How can I run my project normally? It was working fine in windows.

推荐答案

根据本文,您需要为Owner,Group和Everyone授予读取/执行权限.

According to this article, you need to give read/execute permissions to Owner, Group, and Everyone.

将问题文件的权限设置为777.请注意,应避免在可从Internet访问的服务器上执行此操作.

Set permissions on the problem file to 777. Note, you should avoid doing this on a server that's accessible from the internet.

http://webomania.wordpress.com/2007/03/12/permission-denyed-in-unknown-online-0/

这篇关于打开本地主机时权限被拒绝的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆