LoginSignup
0
1

More than 5 years have passed since last update.

パーミッションの一括変更

Last updated at Posted at 2018-08-30

概要

グループに所属の他メンバーでも編集可能なようにパーミッションを一括変更するコマンドをメモしておく。

一括変更

chownのユーザーとグループの指定は任意に変更する。

ターミナル
# 対象フォルダを指定
export TARGET=/var/www/www.example.com/

# 所有者を変更する
sudo chown -R ec2-user:apache {$TARGET}

# パーミッションを変更する
sudo chmod 2775 {$TARGET}
find {$TARGET} -type d -exec sudo chmod 2775 {} \;
find {$TARGET} -type f -exec sudo chmod 0664 {} \;

以上

参考サイト

0
1
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
1