You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Daily log file inaccessible by web when created by cli and vice-versa #39
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:
The DK projects would automatically use the latest version of dot-log
after running composer update (or composer update --no-dev, depending on the environment).
Since the DK projects require dot-log only via dot-errorhandler (not directly),
forcing them would require a patch release in all versions of dot-errorhandler
and then an update in their composer.json files that would require the latest version of dot-errorhandler that implements the latest version of dot-log.
Activity
alexmerlin commentedon Jul 31, 2026
@arhimede I seem to have found a fix for this issue!
Each log writer has its
optionswhere we need to tell the writer what permissions should a log file have on creation.Example:
https://github.com/dotkernel/admin/blob/7.0/config/autoload/error-handling.global.php#L20
See the last 2 lines I added (
modeandchmod):modeis already configured correctly in dot-log but we should still add it, to make sure this behavior does never changechmodis the important one - this give read/write permissions toowner,groupandothers(I tried 0660 but it did not work)The fix could be applied:
But setting those permissions as defaults might prove too permissive in some cases.
arhimede commentedon Jul 31, 2026
@alexmerlin Perfect, let's plan it on all projects
alexmerlin commentedon Aug 3, 2026
It's implemented in dot-log in the following releases:
The DK projects would automatically use the latest version of
dot-logafter running
composer update(orcomposer update --no-dev, depending on the environment).Since the DK projects require
dot-logonly viadot-errorhandler(not directly),forcing them would require a patch release in all versions of
dot-errorhandlerand then an update in their composer.json files that would require the latest version of
dot-errorhandlerthat implements the latest version ofdot-log.