當目錄或檔案使用setfacl設定權限後使用chmod指令修改權限會得到意想不到的結果。
原本要修改group權限會變成修改mask的設定!!
$ ls -ld test
drwxrwxr-x. 2 root root 4096 Aug 3 17:51 test
$ getfacl test/
$ file: test/
$ owner: root
$ group: root
user::rwx
group::rwx
other::r-x
$ setfacl -m u:eva-chien:rwx test/
$ ls -ld test/
drwxrwxr-x+ 2 root root 4096 Aug 3 17:51 test/
$ getfacl test/
$ file: test/
$ owner: root
$ group: root
user::rwx
user:eva-chien:rwx
group::rwx
mask::rwx
other::r-x
$ chmod 755 test/
$ ls -ld test/
drwxr-xr-x+ 2 root root 4096 Aug 3 17:51 test/
$ getfacl test/
$ file: test/
$ owner: root
$ group: root
user::rwx
user:eva-chien:rwx #effective:r-x
group::rwx #effective:r-x
mask::r-x
other::r-x
全站熱搜