Laravel daily log created with wrong permissions
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I have a script that I run using php artisan (with root user), and sometimes it causes the daily log file to be created before the apache www-data user does - which means that when a real user uses my web application, I get the folder permission error: Failed to open stream: Permission denied I change the permissions back to www-data everytime but I want to solve this by having the log file always created with the correct permissions. I've considered creating a cron job that creates the file or touches it to make sure it has the