autoload_namespaces.php failed to open stream: Permission denied

PHP
I had a similar problem recently, and needed to change the permissions of
  my folders.

By running following commands :
1. php artisan cache:clear
2. chmod -R 777 storage vendor
3. composer dump-autoload

I was able to give all the permissions required to open files and write
  to them etc
Source

Also in PHP: