I have a Laravel 5.4 project using the daily laravel log format. (A daily log file is created)
I also have a supervisor running php artisan queue:work artisan command and is not able to wrote to the daily log file. This is because it is the root user. However, the web server can write to the log file.
I tried to run the following commands:
sudo chmod -R gu+w storage
sudo chmod -R guo+w storage
sudo chown -R root:www-data app/storage
I have discovered the root user is not able to write to the log file as it is created as below;
-rw-r--r-- 1 www-data www-data 12325 May 12 01:30 laravel-2017-05-12.log
The format below would work but needs me to keep on running sudo chmod -R 777 storage which is a security concern.
-rwxrwxrwx 1 ubuntu www-data 111254 May 11 20:55 laravel-2017-05-11.log
How can I solve this, anyone?