LoginSignup
3
2

More than 5 years have passed since last update.

【Linux, パーミッション】グループ開発をするときのディレクトリの権限設定

Last updated at Posted at 2015-07-13

新規開発用グループの作成

グループ作成方法

groupaddコマンドを使用して新規開発用グループを作成

groupadd [グループ名]

グループ作成コマンド例

groupadd hogehoge

開発ユーザを開発用グループに追加

ユーザ追加方法

gpasswdコマンドを使用して、新規開発用グループに開発ユーザを追加

gpasswd -a [ユーザ名] [グループ名]

ユーザ追加コマンド例

gpasswd -a nishide hogehoge

共有ディレクトリのパーミッション設定

共有ディレクトリのパーミッション設定方法

開発用ディレクトリにSGIDを設定

chmod -R 2775 [ディレクトリ名]

パーミッション設定コマンド例

/var/www/htmlのディレクトリ以下にSGIDを設定

chmod -R 2775 /var/www/html
chmod -R g+s /var/www/html
3
2
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
3
2