dotkernel / development

Set up development environment using Ansible+WSL2/Docker.
6 stars 1 forks source link

Daily log file inaccessible by web when created by cli and vice-versa #39

Open alexmerlin opened 3 months ago

alexmerlin commented 3 months ago

Error:

Fatal error: Uncaught ErrorException: fopen(/var/www/admin.dotkernel.localhost/html/config/autoload/../../log/error-log-2024-07-25.log): Failed to open stream: Permission denied in /var/www/admin.dotkernel.localhost/html/vendor/laminas/laminas-log/src/Writer/Stream.php:105

This issue affects all projects: API, Frontend and Admin


Log file properties when created by a web request:

-rw-r--r-- 1 apache apache 0 Jul 25 11:39 error-log-2024-07-25.log

Log file properties when created by a PHP command:

-rw-r--r-- 1 merlin merlin 0 Jul 25 11:41 error-log-2024-07-25.log


Checking groups for the user apache:

groups apache

Output:

apache : apache


Checking groups for my own user merlin:

groups merlin

Output:

merlin : merlin adm wheel cdrom apache docker