The file has three permissions
Owner Permissions Group Permissions Other Permissions
Now there is such a scenario, user A wants to share files to user B who is not in the same group, but does not want to modify other permissions, then FACL will work
FACL can add an extended permission to a file. At this time, you only need to add user B to the file extended permission list and give permission.
FACL usage:
get file FACL
getfacl filename
$ getfacl facl.txt # file: facl.txt # owner: eco # group: eco user::rw - user:tom:rwx // Here, a rwx permission is assigned to user tom group::rw- mask::rwx other::r--
Add FACL to file
setfacl - mu:username:permissions
eg:
setfacl -m u:tom:rwx
Cancel FACL
setfacl - xu:username
eg
setfacl -x u:tom