1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72
| $ echo aaa > file $ mkdir dir $ echo bbb > dir/file $ ll drwxr-xr-x 2 root root 18 Feb 24 17:48 dir/ -rw-r--r-- 1 root root 4 Feb 24 17:50 file $ chacl -l file dir file [u::rw-,g::r--,o::r--] dir [u::rwx,g::r-x,o::r-x] $ getfacl file dir
user::rw- group::r-- other::r--
user::rwx group::r-x other::r-x $ chacl -l file file [u::rw-,g::r--,o::r--]
$ chacl u::rw-,g::r--,o::r--,u:usera:rw,m::rw file
$ ll file -rw-r--r--+ 1 root root 4 Feb 24 18:02 file $ chacl -l file file [u::rw-,u:usera:rw-,g::r--,m::rw-,o::r--] $ getfacl file
user::rw- user:usera:rw- group::r-- mask::rw- other::r--
$ chacl u::rw-,g::r--,o::r--,u:usera:rw,m::r file $ getfacl file
user::rw- user:usera:rw- group::r-- mask::r-- other::r--
$ chacl u::rw-,g::r--,o::r--,u:usera:rwx,m::rwx dir $ chacl -l dir dir [u::rw-,u:usera:rwx,g::r--,m::rwx,o::r--] $ getfacl dir
user::rw- user:usera:rwx group::r-- mask::rwx other::r--
$ chacl -B file dir $ chacl -l file dir file [u::rw-,g::r--,o::r--] dir [u::rw-,g::r--,o::r--]
|