鍍金池/ 問答/Linux/ linux 權(quán)限問題 帶點(diǎn)與不帶點(diǎn)

linux 權(quán)限問題 帶點(diǎn)與不帶點(diǎn)

linux 權(quán)限末尾帶點(diǎn)與不帶點(diǎn)是什么意思啊?我找了好多網(wǎng)站想了解這個問題,要么答非所問,要么根本不提。請指導(dǎo)的人告訴我一下。謝謝 例如:lrwxrwxrwx.
[root@centos7 /]# ll
總用量 24
drwxr-xr-x 3 root root 19 3月 11 19:12 application
lrwxrwxrwx. 1 root root 7 1月 4 18:07 bin -> usr/bin
dr-xr-xr-x. 5 root root 4096 3月 11 20:09 boot
drwxr-xr-x 2 nfsnobody nfsnobody 24 2月 4 16:54 data
drwxr-xr-x 20 root root 3220 4月 15 09:02 dev
drwxr-xr-x. 91 root root 8192 4月 15 09:04 etc
drwxr-xr-x. 9 root root 99 4月 13 14:16 home
lrwxrwxrwx. 1 root root 7 1月 4 18:07 lib -> usr/lib
lrwxrwxrwx. 1 root root 9 1月 4 18:07 lib64 -> usr/lib64
drwxr-xr-x. 2 root root 6 11月 5 2016 media
drwxr-xr-x. 3 root root 18 4月 12 13:25 mnt
drwxr-xr-x. 2 root root 29 2月 10 21:17 opt
dr-xr-xr-x 124 root root 0 4月 15 09:01 proc
dr-xr-x---. 4 root root 134 4月 13 15:16 root
drwxr-xr-x 26 root root 860 4月 15 09:10 run
lrwxrwxrwx. 1 root root 8 1月 4 18:07 sbin -> usr/sbin
drwxr-xr-x 2 root root 92 2月 23 10:37 scripts
drwxr-xr-x. 2 root root 6 11月 5 2016 srv
dr-xr-xr-x 13 root root 0 4月 15 09:01 sys
drwxr-xr-x 2 root root 54 4月 12 16:01 test
drwxrwxrwt. 16 root root 4096 4月 15 09:02 tmp
drwxr-xr-x. 13 root root 155 1月 4 18:07 usr
drwxr-xr-x. 21 root root 4096 4月 12 22:51 var

回答
編輯回答
艷骨

.和SELinux相關(guān),表達(dá)具有額外的安全上下文設(shè)置,可以通過ls -alZ查看

$ ls -alZ
dr-xr-xr-x. root root system_u:object_r:root_t:s0      .
dr-xr-xr-x. root root system_u:object_r:root_t:s0      ..
-rw-r--r--  root root ?                                .autorelabel
lrwxrwxrwx. root root system_u:object_r:bin_t:s0       bin -> usr/bin
dr-xr-xr-x. root root system_u:object_r:boot_t:s0      boot
drwxr-xr-x  root root ?                                data
drwxr-xr-x  root root ?                                dev
drwxr-xr-x. root root system_u:object_r:etc_t:s0       etc
drwxr-xr-x. root root system_u:object_r:home_root_t:s0 home
lrwxrwxrwx. root root system_u:object_r:lib_t:s0       lib -> usr/lib
lrwxrwxrwx. root root system_u:object_r:lib_t:s0       lib64 -> usr/lib64
drwxr-xr-x. root root system_u:object_r:mnt_t:s0       media
drwxr-xr-x. root root system_u:object_r:mnt_t:s0       mnt
drwxr-xr-x. root root system_u:object_r:usr_t:s0       opt
dr-xr-xr-x  root root ?                                proc
-rw-r--r--  root root ?                                .readahead
dr-xr-x---+ root root system_u:object_r:admin_home_t:s0 root
drwxr-xr-x  root root ?                                run
lrwxrwxrwx. root root system_u:object_r:bin_t:s0       sbin -> usr/sbin
drwxr-xr-x. root root system_u:object_r:var_t:s0       srv
drwxr-xr-x  root root ?                                ssd
dr-xr-xr-x  root root ?                                sys
drwxrwxrwt. root root system_u:object_r:tmp_t:s0       tmp
drwxr-xr-x. root root system_u:object_r:usr_t:s0       usr
drwxr-xr-x. root root system_u:object_r:var_t:s0       var
2017年8月16日 14:33
編輯回答
心上人

因為新版本lsaclselinux屬性加進(jìn)去了,與系統(tǒng)無關(guān),新版本的ls代碼使用12個字節(jié)長的char類型的字符數(shù)組modebuf來記錄文件屬生,前面10個和老版本一樣,第一表示類型,后9個表示權(quán)限,第11個表示selinux和acl的設(shè)置,最后一個當(dāng)然是c的結(jié)尾符0了。

當(dāng)文件或者文件夾只使用了selinux context的屬性,那么這個在ls -l時后面會是一個點(diǎn)。

只要設(shè)置了acl,就是那個setfacl設(shè)置的,后面將是一個加(+)號

2017年11月27日 04:51