LoginSignup
47
52

More than 5 years have passed since last update.

Laravelのパーミッションを適切に設定

Last updated at Posted at 2017-05-11

OSはUbuntu16.04
以下のコマンド上から順番に実行しないと適切に設定されない

webサーバーのApacheをインストールすると作成されるwww-dataをグループに追加する
sudo chown -R myusername:www-data laravel-root-directory

ディレクトリに対して権限を変更
sudo find laravel-root-directory -type d -exec chmod 750 {} \;

ファイルに対して権限を変更
sudo find laravel-root-directory -type f -exec chmod 640 {} \;

最後にストレージとキャッシュの権限を変更
sudo chmod -R 770 laravel-root-directory/storage/ laravel-root-directory/bootstrap/cache/

47
52
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
47
52