How can I configure my Laravel or Ubuntu server so my Laravel logger creates a log file with the 664 permissions? Right now it defaults to 644.

How can I configure my Laravel or Ubuntu server so my Laravel logger creates a log file with the 664 permissions? Right now it defaults to 644.

Open config\logging.php file and add permission key to your default log channel. Is seems that this feature is available from Laravel 5.6.10.
Example:
return [
'channels' => [
'single' => [
'driver' => 'single',
'path' => storage_path('logs/laravel.log'),
'level' => env('LOG_LEVEL', 'debug'),
'permission' => 0664, // this is the new key to add
],
],
];
Notes:
singlepermission key has the value without quotes and with leading zero. read more about this in php manual of chmod