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/
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 ^^
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community