Modify ACL entries on a file by using the setfacl command.
$ setfacl -m acl-entry-list filename ... |
-m |
Modifies the existing ACL entry. |
acl-entry-list |
Specifies the list of one or more ACL entries to modify on the file or directory. You can also modify default ACL entries on a directory. Table 15–8 and Table 15–9 show the valid ACL entries. |
filename ... |
Specifies one or more files or directories, separated by a space. |
Verify that the ACL entries were modified on the file by using the getfacl command.
$ getfacl filename |
In the following example, the permissions for the user george are modified to read and write.
$ setfacl -m user:george:6 ch3.doc $ getfacl ch3.doc # file: ch3.doc # owner: nathan # group: staff user::rw- user::george:rw- #effective:r-- group::r- #effective:r-- mask:r-- other:r- |
In the following example, the default permissions for the group staff are modified to read and the default ACL mask permissions are modified to read and write on the book directory.
$ setfacl -m default:group:staff:4,default:mask:6 book |