chmod 777 禁止!

何も考えずにchmod 777 ${some_file}するの、やめて本当にマジで。
そのファイルの所有者やグループ設定、何の意味もなくなっちゃうでしょ! 誰でも読み書き削除できちゃうじゃんか!
というニュアンスが、拙い英語だとほぼ通じない。特に相手は強者インド人。
自分:「このsleep 10は何のためにあるの?」
インド人:「ああ、2秒くらい待てば良い?(言いながらsleep 2にチョチョイと修正)」
自分:「修正する前に質問に答えなさい!」
万事がこんな感じ。Don't set three seven! Any process accidentally write or remove the file!なんて言ってみたところでBut that's more convenient.と返されるだけ…。
本当に必要な権限なんだったら、せめてchmod a=rwx ${file}にして。実行権を追加したいのなら、chmod a+x ${file}して。man chmodすれば詳しい使い方出てくるんだから。

NAME
     chmod -- change file modes or Access Control
MODES
     Modes may be absolute or symbolic.
     For example, the absolute mode that permits read, write and execute by the owner, read and execute by group members,
     read and execute by others, and no set-uid or set-gid behaviour is 755 (400+200+100+040+010+004+001).
     The symbolic mode is described by the following grammar:
           mode         ::= clause [, clause ...]
           clause       ::= [who ...] [action ...] action
           action       ::= op [perm ...]
           who          ::= a | u | g | o
           op           ::= + | - | =
           perm         ::= r | s | t | w | x | X | u | g | o

体系的に勉強するならLPICがお勧め。世界的なベンダー資格だから、探せば英語版もあると思います。
こちらは教科書的な使い方がメイン。

教科書を読んでコマンドを一通り試したら、下記の練習問題を9割解けるようになるまで繰り返せば、LPIC level1試験は余裕で合格できて、コマンドのオプションにもある程度精通できて楽しいですよー。

インド人の方にも勧めておこう…。

シェアする

  • このエントリーをはてなブックマークに追加

フォローする

Close Bitnami banner
Bitnami