My Laravel application is running under a 'webapps' user on an Ubuntu server. The app generates the cache files with 644 permissions and www-data user an group, for example:
releases/20170108203853/storage/framework/cache/f2/10/f210226bdc5c0df206579b805291fd55
I deploy using Rocketeer and the problem is that when deploying a new release, Rocketeer can't delete the old releases because it doesn't have permissions to remove the cache files as they're under www-data and 664. My webapps user is in www-data group so it wouldn't be a problem if those files would be created with 664. When the old release fails to be removed, for some reason after deploying, I can't see the new deployed release live, I still see the old one even though the 'current' release is pointing to the new deploy.
How do I setup Laravel or on Ubuntu level to have those files generated with the 664 permissions?