I use laravel 5.4 and daily logs for log error.
But sometimes the current log is deleted and laravel generates this error:The stream or file "/storage/logs/laravel-2019-09-06.log" could not be opened: failed to open stream: Permission denied but the file has been already created.
I create manually the log file and put this permission chmod 775 -R to storage directory but it gets lost anyway.
I asked the same question about
https://laracasts.comand we were able to solve the problem.Find the solution here:
https://laracasts.com/discuss/channels/laravel/how-to-fix-laravel-recent-daily-log-file-has-been-deleted