简体   繁体   English

PHP Codeigniter错误无法打开流:权限被拒绝

[英]PHP Codeigniter error failed to open stream: Permission denied

I have been working on a project that uses codeigninter. 我一直在研究一个使用codeigninter的项目。 I worked on it in Windows 7 and it was fine but after I moved this project on Ubuntu to work on it there, It gives me this error in every page/controller/method that I try to access: 我在Windows 7中工作过它很好但是我在Ubuntu上移动这个项目后在那里工作,它在我尝试访问的每个页面/控制器/方法中给出了这个错误:

Warning: require_once(/opt/lampp/htdocs/TS_Project/system/core/CodeIgniter.php): failed to open stream: Permission denied in /opt/lampp/htdocs/TS_Project/index.php on line 202

Fatal error: require_once(): Failed opening required '/opt/lampp/htdocs/TS_Project/system/core/CodeIgniter.php' (include_path='.:/opt/lampp/lib/php') in /opt/lampp/htdocs/TS_Project/index.php on line 202

The CodeIgniter.php file does exist, the path to it is correct and I am able to read and write in it ( I can open it in a text editor and modify it freely). CodeIgniter.php文件确实存在,它的路径是正确的,我能够读取和写入它(我可以在文本编辑器中打开它并自由地修改它)。 I tried changing the file permission to it using the chmod command but nothing happens. 我尝试使用chmod命令更改文件权限,但没有任何反应。 Why is permission denied to the CodeIgniter.php file? 为什么拒绝CodeIgniter.php文件的权限?

You need to change the permission of your TS_Project folder to 755. 您需要将TS_Project文件夹的权限更改为755。

You can do that by: 你可以这样做:

sudo chmod -R 755 /opt/lampp/htdocs/TS_Project

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM