CakePHP3 ログ(Log)のパーミッション変更方法です。
◯ 「config/app.php」ファイルのLog定義に『mask』追記
※ logs/debug.log , logs/error.log
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | /** * Configures logging options */ 'Log' => [ 'debug' => [ 'className' => 'Cake\Log\Engine\FileLog', 'path' => LOGS, 'file' => 'debug', 'levels' => ['notice', 'info', 'debug'], 'url' => env('LOG_DEBUG_URL', null), 'mask' => 0664, // 追記 左記パーミッションでファイル作成される(既にファイル存在する場合は変更されない) ], 'error' => [ 'className' => 'Cake\Log\Engine\FileLog', 'path' => LOGS, 'file' => 'error', 'levels' => ['warning', 'error', 'critical', 'alert', 'emergency'], 'url' => env('LOG_ERROR_URL', null), 'mask' => 0664, // 追記 デフォルト 644 ], ], |