0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

laravelで環境構築時にstrageのpermissionエラーが発生する件について

Posted at

現状

  • laravelをコマンドで初期作成した。
  • 実行すると、permissionエラーが発生した。

解決方法

  • 権限を与えて、書き込みが可能なようにした。

具体的な解決策

一番楽ではあるが、最大権限であるのでセキュリティリスクが上がってしまう。

chmod -R 777 storage

若干セキュリティリスクを下げたもの

chmod -R 755 /var/www/html/storage
chown -R www-data:www-data /var/www/html/storage

所有者を変更し、権限を付与するようにしている。

まとめ

権限周りのことをほとんど理解していない人間なので、もっと権限を絞りながら行う方法を学んだ場合は追記する。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?