差分

移動先: 案内検索

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

184 バイト追加, 2015年7月27日 (月) 17:18
/* グループID利用の方法 */
<pre class="bash">
$ ls -l
合計 56
-rw-r--r-- 1 taro taro 51200 2005-11-23 18:33 group_share.dat
</pre>
<pre class="bash">
$ chmod o-wr group_share.dat
$ chmod g+wr group_share.dat
</pre>
あるいは
<pre class="bash">
$ chmod 660 group_share.dat
</pre>
 
結果は次のようになります。
 
<pre class="bash">
$ ls -l
合計 56
-rw-rw---- 1 taro taro 51200 2005-11-23 18:33 group_share.dat
</pre>
<pre class="bash">
# groupadd taro-hanako
# gpasswd -a taro taro-hanako
# gpasswd -a hanako taro-hanako
</pre>
<pre class="bash">
$ chgrp taro-hanako group_share.dat
...
-rw-rw---- 1 taro taro-hanako 51200 2005-11-23 18:33 group_share.dat
</pre>
<pre class="bash">
$ ps aux
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
hironobu 2796 0.0 1.0 8752 6716 ? R 12:14 0:05 emacs20 -geometry
...
</pre>
== 現在の権限管理 ==