0
votes

Initially I was trying to update to Laravel 5.6 from 5.5, however nothing works anymore since I ran composer update. I can't even go back to 5.5, always get the same error:

In Filesystem.php line 122:

file_put_contents(C:\Users...\laravelprojectroot\bootstrap/cache/packages.php): failed to open stream: Permission denied

I tried deleting the cache, deleting vendor dictionary and deleting packages.php. Once I ran composer update, I cannot edit or delete packages.php even with root permission on my laptop.

Please help.

2

2 Answers

2
votes

Open cmd prompt or git bash with admin privilege, That solves this issue.

0
votes

Create these directories if they don't exist:

  • storage/framework/cache
  • storage/framework/sessions
  • storage/framework/views

Then delete bootstrap/cache files

Test if it works, if not, try giving the correct permissions to the storage folder: chmod -R 775 storage/