差分

移動先: 案内検索

ユーザ権限とアクセス制御

138 バイト除去, 2018年12月13日 (木) 17:47
/* グループID利用の方法 */
<syntaxhighlight langpre class="bash">
$ ls -l
合計 56
-rw-r--r-- 1 taro taro 51200 2005-11-23 18:33 group_share.dat
</syntaxhighlightpre>
<syntaxhighlight langpre class="bash">
$ chmod o-wr group_share.dat
$ chmod g+wr group_share.dat
</syntaxhighlightpre>
あるいは
<syntaxhighlight langpre class="bash">
$ chmod 660 group_share.dat
</syntaxhighlightpre>
<syntaxhighlight langpre class="bash">
$ ls -l
合計 56
-rw-rw---- 1 taro taro 51200 2005-11-23 18:33 group_share.dat
</syntaxhighlightpre>
<syntaxhighlight langpre class="bash">
# groupadd taro-hanako
# gpasswd -a taro taro-hanako
# gpasswd -a hanako taro-hanako
</syntaxhighlightpre>
<syntaxhighlight langpre class="bash">
$ chgrp taro-hanako group_share.dat
...
-rw-rw---- 1 taro taro-hanako 51200 2005-11-23 18:33 group_share.dat
</syntaxhighlightpre>