[root@localhost ~]# cd /home 注:進入/home 目錄; [root@localhost home]# mkdir RedHatdir 注:創建一個目錄redhatdir [root@localhost home]# touch redhatdir/test.txt 注:創建一個文件test.txt [root@localhost home]# chmod 700 redhatdir/ 注:修改redhatdir的權限,為屬主可讀可寫可執行,屬組和其它用戶無權限; [root@localhost home]# ls -ld redhatdir/ 注:查看redhatdir的屬性; drwx------ 2 root root 4096 04-25 13:01 redhatdir/ [root@localhost home]# ls -lr redhatdir/ 注:查看test.txt 文件的屬性; 總計 0 -rw-r--r-- 1 root root 0 04-25 13:02 test.txt [root@localhost home]# su beinan 注:我們切換到普通用戶beinan [beinan@localhost home]$ cd redhatdir/ 注:進入redhatdir目錄,以beinan用戶身份。 bash: cd: redhatdir/: 權限不夠 [beinan@localhost home]$ more redhatdir/test.txt redhatdir/test.txt: 權限不夠 |
[root@localhost home]# chmod 704 redhatdir/ [root@localhost home]# ls -ld redhatdir/ drwx---r-- 2 root root 4096 04-25 13:02 redhatdir [root@localhost home]# su beinan [beinan@localhost home]$ cd redhatdir/ bash: cd: redhatdir/: 權限不夠 |
新聞熱點
疑難解答