0

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.

3 Answers 3

2

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

Sign up to request clarification or add additional context in comments.

3 Comments

Where i can change that? I do an ssh to the server and there change the folder permission?
Please try only php artisan key:generate, if after that problem continues, then try change permission. If you work in production server please be very careful. At first see application folder permissions. Connect with ssh to server, go to you application folder and type ls -la (if you use Linux environment). After that you should see all folders and files permissions. And after that if you want to change any permission use chmod command computerhope.com/unix/uchmod.htm
So, I did what you said. Firstly, on the server, I generated a new api key. Forge so smart, he updated the key the env. file on the server by itself. So this is strange. Then, just for fun, I added 777 permission to my application folder, but nothing happened. I do not understand.
0

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

Comments

0

change the ownership using these commands

sudo chown -R www-data:www-data storage bootstrap/cache sudo chmod -R 775 storage bootstrap/cache 

and after that refresh with artisan commands

php artisan cache:clear php artisan view:clear php artisan config:clear php artisan route:clear 

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.