2 GP
[Linux][CentOS 5.5] 5. 基礎權限設定
作者:game2002│2011-02-23 21:40:47│巴幣:2│人氣:296
5. 基礎權限設定
題目:
1. Create a file called yak and display the file permissions.
2. Devise a command to set the following permission on yak.
a. the owner has read and write privileges.
b. group members have read-only privileges.
c. others cannot access the file at all.
3. Execute the command devised above and observe the effect.
4. Execute a command that would revoke read privileges from the group on yak.
5. Execute the command devised above and observe the effect.
---------------------------------------------------------------------------------------------------------
solution:
1. 建立檔案名為yak
[hhh@station8 ~]$ touch yak
[hhh@station8 ~]$ ls -l
總計 1
-rw-rw-r-- 1 hhh hhh 0 2月 23 20:57 yak
2. 更改yak的權限設定,以符合題目的要求。
[hhh@station8 ~]$ chmod 640 yak
[hhh@station8 ~]$ ls -l
總計 1
-rw-r----- 1 hhh hhh 0 2月 23 20:57 yak
3. 依據題目要求,修正 group 的權限。
[hhh@station8 ~]$ chmod 600 yak
[hhh@station8 ~]$ ls -l
總計 1
-rw------- 1 hhh hhh 0 2月 23 20:57 yak
引用網址:http://www.jamesdambrosio.com/TrackBack.php?sn=1241249
All rights reserved. 版權所有,保留一切權利