Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

mdupor's avatar

Laravel logging permissions

How are log permissions supposed to work? https://laravel.com/docs/8.x/logging#configuring-the-single-and-daily-channels

        'daily' => [
            'driver'     => 'daily',
            'tap'        => [CustomizeFormatter::class],
            'path'       => storage_path('logs/laravel.log'),
            'level'      => 'debug',
            'days'       => 14,
            'permission' => 664,
        ],

I tried with numeric value as well as doing a string like '0664', and logs get created with --w--wx--T permissions? What am I missing here?

Also, how do I control the owner of the log file? Usually it is daemon:daemon, but last day it got created as a root:root and it broke everything.

0 likes
1 reply
bobbybouwmann's avatar

The log file is created by the user that is running the application. So if your web server creates the log file, that should also be the owner. if it's created by running a command with php artisan or something else, it could be that it's created by that user.

The integer 0664 should work here, so no string.

Please or to participate in this conversation.