I was playing around with a working Laravel 4 installation and moved everything into a sub folder. Then I decided to not do that and I moved it all back (all via the command line):
mv * /folder
and then
cd folder
mv * ../
Now, the site is throwing the following error:
file_put_contents(/var/www/quantquote/app/storage/meta/services.json): failed to open stream: Permission denied
Here is a screenshot of the full error:
http://i.imgur.com/8deGG97.png
I've already tried setting permissions on the /storage folder to 777 to no avail.
Spent a whole day for solving this and this command simply solved my problem.
If your permissions are 777 for Laravel App folder and you still get this error, it's because SEliux has blocked it. You can easily unblock your application's folder using this command:
su -c "chcon -R -h -t httpd_sys_script_rw_t /usr/share/nginx/YOUR_LARAVEL_APP/"
That's it!
BTW never disable SElinux: http://stopdisablingselinux.com/
As I stated in my comment:
find app/storage -type d -exec chmod 777 {} \;
find app/storage -type f -exec chmod 777 {} \;
This will chmod all directories and files in app/storage
to 777.
As the problem is related to permissions try re-giving the right permissions to app/storage
and all its sub-directories and file.
You can do so from the root path of your Laravel app typing:
chmod -Rvc 777 app/storage
If for some reason this doesn't work, try:
find app/storage -type d -exec chmod -vc 777 {} \;
find app/storage -type f -exec chmod -vc 777 {} \;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With