(同じ利用者による、間の2版が非表示) | |||
8行目: | 8行目: | ||
$ chmod a=rwx file | $ chmod a=rwx file | ||
$ chmod 777 file | $ chmod 777 file | ||
==SUID, SGID, StickyBit== | |||
$ chmod u+s file ← 誰が実行してもファイル所有者として実行される | |||
$ chmod 4755 file | |||
$ chmod g+s dir/ ← 誰がファイルを作成しても所有グループが統一される | |||
$ chmod 2770 dir/ | |||
$ chmod o+t /tmp/ ← フィル所有者のみファイル操作できる | |||
$ chmod 1777 /tmp |
2019年2月27日 (水) 13:22時点における最新版
オプション
- -R
- recursive
$ chmod u+rwx,g+rx,o+rx file $ chmod 755 file $ chmod a=rwx file $ chmod 777 file
SUID, SGID, StickyBit
$ chmod u+s file ← 誰が実行してもファイル所有者として実行される $ chmod 4755 file $ chmod g+s dir/ ← 誰がファイルを作成しても所有グループが統一される $ chmod 2770 dir/ $ chmod o+t /tmp/ ← フィル所有者のみファイル操作できる $ chmod 1777 /tmp