Ubuntuが正常に動作しないとき

不足している依存関係を解決し、壊れたパッケージを修正

apt-get install -f

最新のパッケージリストを取得

apt-get update

localhostへアクセスすると次のエラー

The stream or file “/var/www/html/storage/logs/laravel.log” could not be opened in append mode: Failed to open stream: Permission denied The exception occurred while attempting to log: 

下記記事で解決

www.jinmusoftware.com

ルートユーザに書き込み権限をもたせる方法で解決しました。

cd xxxxapp

./vendor/bin/sail up -d

./vendor/bin/sail root-shell

chown sail:sail . -R

exit

記事内ではルート権限を用いて、

一般ユーザーに切り替えLaravelをインストールする方法も紹介されています。