Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

file_put_content...fail to open stream:Permission denied in Laravel 5

Tags:

php

laravel

The error is mention in below:-

ErrorException in Filesystem.php line 81:
   file_put_contents(/var/www/html/Training-management-system/storage/framework/views/bcb68ba8b65b7fabca5fe88709fb00b6): failed to open stream: Permission denied

I can google itbut not get the exact solution. SO I am thankful if anyone help me to solve it out.

like image 370
Pawan Dongol Avatar asked Jun 28 '15 10:06

Pawan Dongol


3 Answers

is a file permissions issue as lesssugar said , you need to give writte permissions to the storage folder , so go to your html/Tranining-management-system.. folder an then you can do :

chmod -R 0777 storage/

That will change to writte access Recursively .

Please read the configuration section in docs :

http://laravel.com/docs/master#configuration

You have to do the same with the cache folder.

like image 148
Joaquin Javi Avatar answered Nov 17 '22 01:11

Joaquin Javi


I run php artisan view:cache and it solved the issue

like image 9
cetric Avatar answered Nov 17 '22 01:11

cetric


This is an error with the view file cache. Please run php artisan view:cache

like image 1
Kavishka Hirushan Avatar answered Nov 17 '22 01:11

Kavishka Hirushan