1
votes

I am posting this because I have all possible solution from the stackoverflow answers.

file_put_contents(/var/www/project-name/bootstrap/cache/packages.phpaVsm7S): failed to open stream: Permission denied

I am having this error of permission denied. I have recently put the project in virtualbox using vagrant.

I have done following,

sudo chmod -R 777 bootstrap composer dump-autoload

This is my user on vagrant

vagrant@ubuntu-xenial:

Still no luck.

Please, help me. Thank you.

1
whats about php artisan optimize --force ?sta
Thanks @TalhaF. It's worked for me without --force.Almas Dusal

1 Answers

-1
votes
sudo chmod -R 777 /project-name