Support the ongoing development of Laravel.io →
Configuration Session Cache
Last updated 2 years ago.
0

i think although you set the chmod to 777 the first time the server writes to the file the permission must be changing to what ever is set in the php config, It's better to set the folder owner as the php user.

instead of setting chmod to 777 change the ownership to the php user. To see the php user run :

php -i | grep USER 

to get the user's group:

groups username

then make the user the owner of storage and cache directories

chown -R user:group /var/www/web/storage/
chown -R user:group /var/www/web/bootstrap/cache/
0

Thanks for the response.

It seems as though :

get_current_user()

was not returning the correct user.

It was my vagrant user.

So after setting up the permissions as such:

chown -R vagrant:www-data /var/www/web/storage/
chown -R vagrant:www-data /var/www/web/bootstrap/cache/

All is well ^^

0

Sign in to participate in this thread!

Eventy

Your banner here too?

eXist73 exist73 Joined 7 Jan 2016

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.