When I access my Centos production server, I got this debug message:
ErrorException
file_put_contents(/var/www/projectplanner/releases/20140610043651/app/storage/meta/services.json): failed to open stream: Permission denied
I have already checked many similar topics on the matter but no good (like chmod 777, clear php artisan cache...)
Here is the ls -l of my production server
Related
I'm a newbie to laravel. I used xammp and composer to install laravel. The installing process was successful. But when I try to launch localhost:8000 it says
The stream or file "C:\Windows\System32\AwesomeProject\storage\logs/laravel.log" could not be opened in
append mode: Failed to open stream: Permission denied
OS is windows 10. So Please help me to fix this problem...
Check that the directory exists and the permissions on the directory are writable by your user. C:\Windows\System32 is not the right place for your Laravel project.
When I navigate to Laravel app on my CentOS server, it gives HTTP ERROR 500
So, when I checked my server error log, it says this error
PHP Fatal error: Uncaught UnexpectedValueException: The stream or file "/var/www/html/storage/logs/laravel.log" could not be opened: failed to open stream: Permission denied in /var/www/html/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php:107\nStack trace:\n#0
I have already set 777 permission to storage and bootstrap directories.
This very Laravel application runs fine on another server. So, what's the big deal here ?
This error can be fixed by disabling SE-Linux.
Check if it has been enabled by typing...
$ sestatus
So, disable it by typing...
# setenforce 0
It is said that the system needs to be restarted to to take effect the changes.
However, for me, restarting Apache was enough and fixed the problem :-)
Hope this helps!
If your application is laravel and you use sail so add these lines in end of .env file:
WWWGROUP=1000
WWWUSER=1000
I know its late to answer but maybe helps for others.
Server: Centos 6
I have set permissions on this dev server to 0777 all the way back to the home folder (/home/...)
changed the owner to apache all all files
SELINUX is disabled
Still, when running script from browser, I get:
Warning: include_once(/home/..._somthing.php): failed to open stream:
Permission denied
I can only execute as root from the command line.
help?
I installed Laravel on my remote server, but i get this error:
file_put_contents(/www/htdocs/user-id/domain.com/app/storage/meta/services.json): failed to open stream: Permission denied
I changed permissions
app/storage
to
777
and i followed instructions from:
http://stackoverflow.com/questions/17020513/laravel-4-failed-to-open-stream-permission-denied/22192814#22192814
But error stayed.
Anybody could help me with this?
Greetings and thanks!
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?
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