Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PHP Codeigniter error failed to open stream: Permission denied

I have been working on a project that uses 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:

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). I tried changing the file permission to it using the chmod command but nothing happens. Why is permission denied to the CodeIgniter.php file?

like image 684
Grigoruta Cristian Avatar asked Sep 01 '13 18:09

Grigoruta Cristian


1 Answers

You need to change the permission of your TS_Project folder to 755.

You can do that by:

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

like image 83
Satyam Singh Avatar answered Oct 24 '22 11:10

Satyam Singh