1 2 3 4 5 6 7 8 9 10 | [root@FC3-vm mnt]# setfacl -x g:testg1 file1 [root@FC3-vm mnt]# getfacl file1 # file: file1 # owner: root # group: root user::rw- user:testu1:rwx group::r-- mask::rwx other::r-- |
1 2 3 4 5 6 7 8 | [root@FC3-vm mnt]# setfacl -b file1 [root@FC3-vm mnt]# getfacl file1 # file: file1 # owner: root # group: root user::rw- group::r-- other::r-- |
1 2 3 4 5 6 7 8 9 10 | [root@FC3-vm mnt]# setfacl --set u::rw,u:testu1:rw,g::r,o::- file1 [root@FC3-vm mnt]# getfacl file1 # file: file1 # owner: root # group: root user::rw- user:testu1:rw- group::r-- mask::rw- other::--- |
1 | [root@FC3-vm mnt]# setfacl --set u::rw,u:testu1:rw,g::r,o::- dir1 |
1 2 3 4 5 6 7 | [root@FC3-vm mnt]# cat test.acl user:testu1:rw- user:testu2:rw- group:testg1:r-- group:testg2:r-- mask::rw- other::--- |
1 2 3 4 5 6 7 8 9 10 11 12 13 | [root@FC3-vm mnt]# setfacl -d --set g:testg1:rwx dir1 [root@FC3-vm mnt]# getfacl dir1 # file: dir1 # owner: root # group: root user::rwx group::r-x other::r-x default:user::rwx default:group::r-x default:group:testg1:rwx default:mask::rwx defaultther::r-x |
1 2 3 4 5 6 7 8 9 10 | [root@FC3-vm mnt]# touch dir1/file1 [root@FC3-vm mnt]# getfacl dir1/file1 # file: dir1/file1 # owner: root # group: root user::rw- group::r-x #effective:r-- group:testg1:rwx #effective:rw- mask::rw- other::r-- |
1 2 3 4 | [root@FC3-vm mnt]# getfacl -R dir1 > dir1.acl [root@FC3-vm mnt]# ls -l dir1.acl total 16 -rw-r--r-- 1 root root 310 Dec 12 21:10 dir1.acl |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | [root@FC3-vm mnt]# setfacl -R -b dir1 [root@FC3-vm mnt]# getfacl -R dir1 # file: dir1 # owner: root # group: root user::rwx group::r-x other::r-x # file: dir1/file1 # owner: root # group: root user::rw- group::r-- other::r-- |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | [root@FC3-vm mnt]# setfacl --restore dir1.acl [root@FC3-vm mnt]# getfacl -R dir1 # file: dir1 # owner: root # group: root user::rwx group::r-x other::r-x default:user::rwx default:group::r-x default:group:testg1:rwx default:mask::rwx defaultther::r-x # file: dir1/file1 # owner: root # group: root user::rw- group::r-x #effective:r-- group:testg1:rwx #effective:rw- mask::rw- other::r-- |
欢迎光临 电子技术论坛_中国专业的电子工程师学习交流社区-中电网技术论坛 (http://bbs.eccn.com/) | Powered by Discuz! 7.0.0 |