EC2サーバー上のLaravelでTaskScheduleを実行します。
$ php /var/www/html/myapp/artisan schedule:run
Laravelはnginxで動いているので、nginxから実行しようとした結果、キャッシュへの書き込み権限が無いようです。
Running scheduled command: ‘/usr/bin/php-7.1’ ‘artisan’ posts:send > ‘/dev/null’ 2>&1 ErrorException : file_put_contents(/var/www/html/myapp/storage/framework/cache/data/e4/7b/e47bcad220fe3c17e6b38c83a02d492ff804a80e): failed to open stream: Permission denied at /var/www/html/myapp/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php:122 118| * @return int 119| */ 120| public function put($path, $contents, $lock = false) 121| { > 122| return file_put_contents($path, $contents, $lock ? LOCK_EX : 0); 123| } 124| 125| /** 126| * Prepend to a file. Exception trace: 1 file_put_contents(“/var/www/html/myapp/storage/framework/cache/data/e4/7b/e47bcad220fe3c17e6b38c83a02d492ff804a80e”, “1558416961b:1;“) /var/www/html/myapp/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php:122 2 Illuminate\Filesystem\Filesystem::put(“/var/www/html/myapp/storage/framework/cache/data/e4/7b/e47bcad220fe3c17e6b38c83a02d492ff804a80e”, “1558416961b:1;“) /var/www/html/myapp/vendor/laravel/framework/src/Illuminate/Cache/FileStore.php:65 Please use the argument -v to see more details.
どのように解決したら良いでしょうか?
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。