As others have said... 777 was a permission level added to *nix systems so people could argue over 777. Since according to others there is NEVER a reason to use them.
Okay... I know that is a little tongue in cheek... but this "hand slap" on EVERY SINGLE SITE (bgies having copied/pasted this to a NUMBER of forums) does get a little old.
The better question might be WHY CAN'T LARAVEL GET THEIR INSTALL PROCESS TO STOP INSTALLING THINGS WITH THE WRONG PERMISSIONS"
Seems like it might solve all these silly strings of confused people.
I have a problem with deleting new created files. Laravel creates new files like session or cache with 644 permission. My deploy script can not delete this files although he is in www-data group. Have no idea how to fix it. Dont want to give jenkins user sudo privileges. Why Laravel give chmod 644 to his files?
I was here to ask you all if there is a 'file permission' setting to insert into cache.php config file at stores['file'][] level
My user is also member of www-data but cache file are created with a 644 permission, so shell user cannot delete the cache. I'm running only the php artisan opt:clear command using sudo. But it's a big problem for autodeploy.