『-r--------』,且擁有者為 root。
『drwxrwxrwt』,任何用戶都可在 /tmp 內新增、修改檔案,但僅有該檔案/目錄建立者與 root 能夠刪除自己的目錄或檔案。
ls -l 列出檔案屬性,如:
rwsrw-r--表示設置 SUID 屬性rwxrwsrw-表示設置 SGID 屬性rwxrw-rwt表示設置 SBIT 屬性
x 屬性,則這些特殊屬性顯示為小寫字母 (s, s, t),否則顯示為大寫字母 (S, S, T)。
rwx 屬性之設定類似:
foo 的屬性。
[root@dywHome2 test]# chmod 4755 foo; ll foo -rwsr-xr-x 1 root root 7 Sep 4 13:25 foo* [root@dywHome2 test]# chmod 6755 foo; ll foo -rwsr-sr-x 1 root root 7 Sep 4 13:25 foo* [root@dywHome2 test]# chmod 1755 foo; ll foo -rwxr-xr-t 1 root root 7 Sep 4 13:25 foo* [root@dywHome2 test]# chmod 7666 foo; ll foo -rwSrwSrwT 1 root root 7 Sep 4 13:25 foo
[root@dywHome2 test]# ll /usr/bin/passwd; ls -ld /var/spool/mail;\ >ls -ld /tmp -r-s--x--x 1 root root 15552 May 8 2006 /usr/bin/passwd* drwxrwsr-x 2 root mail 1024 Aug 3 2006 /var/spool/mail/ drwxrwxrwt 26 root root 2048 Sep 4 15:51 /tmp/