Laravel Forge: file_put_contents(): failed to open stream: Permission denied

So I just started to use Laravel Forge, and deployed my first app. The Deploy was succes and everything's fine. But if you hit the app uri, it can't load the admin login site.

ErrorException in Filesystem.php line 75:

file_put_contents(/9186b8608ec5b5727b9bcb2f0c6f3759): failed to open stream: Permission denied

in Filesystem.php line 75

at HandleExceptions->handleError('2', 'file_put_contents(/9186b8608ec5b5727b9bcb2f0c6f3759): failed to open stream: Permission denied', '/home/forge/bmm.com/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php', '75', array('path' => '/9186b8608ec5b5727b9bcb2f0c6f3759', 'contents' => '.......

How can I set the right permission? Thank you for the answers.

Upvotes: 0

Views: 1885

Answers (2)

Vahe Galstyan
Vahe Galstyan

Reputation: 1729

Please try php artisan key:generate after that change your application folder permission to 755. It should solve your problem.

Upvotes: 2

Aditya
Aditya

Reputation: 851

Do you want to write a url or get a url file open? In case of get it should be file_get_contents

Upvotes: 0

Related Questions