I am trying to store the Lumen php framework logs in /var/log/apache2/
instead of its installation dir/storage/logs/ folder.
Lumen-side is fine as I can write log files in /tmp/ just fine.
Something I really cannot grasp even after a half day of research, trials and head scratching is this:
- I'm running Ubuntu 16.04
- logfiles stored in /var/log/apache2/ have ownership root:adm and priv -rw-r--r--
- Apache runs as www-data user and part of www-data group only
- I understand logrotate has the config line "create 640 root adm" so new log files are created like that
- I believe selinux is not operating (sestatus command not found...)
So.... how comes that Apache can write its log files??
Clarifying this mystery may lead to a solution to my main problem. I really want to store the Lumen framework logs outside the Lumen installation directory as it gets replaced by continuous integration process.
I researched a lot on the topic and basics, but I could not find an answer.