Failed to Open Stream using laravel install

laravel, laravel-5, php

Solution

It seems the user you're running the command with, doesn't have the necessary permissions to write to `/var/www/html/`. Try changing the permissions or owner of that directory. Try:

sudo chown $USER /var/www/html

The `$USER` variable contains the logged in username (in your case `ren`), so it will make your user the owner of that directory. Then run the installation command:

laravel new blog

Problem

I am trying out Laravel and after installation I get the following when attempting to start a new application: using code: `laravel new blog` I get: ``` PHP Warning: file_put_contents(/var/www/html/laravel_d4381b5ce250405766ef8b9fa784b256.zip): failed to open stream: Permission denied in /home/ren/.composer/vendor/laravel/installer/src/NewCommand.php on line 81 PHP Warning: ZipArchive::extractTo(): Permission denied in /home/ren/.composer/vendor/laravel/installer/src/NewCommand.php on line 99 PHP Warning: ZipArchive::close(): Invalid or unitialized Zip object in /home/ren/.composer/vendor/laravel/installer/src/NewCommand.php on line 101 Application ready! Build something amazing. ```

Original source