How to use getfacl and setfacl in Linux?

How to use getfacl and setfacl in Linux?

The command “setfacl” refers to Set File Access Control Lists and “getfacl” refers to Get File Access Control List. Each file and directory in a Linux filesystem is created with a specific set of file permissions for its access. Each user can have different set of file access permissions.

How to use getfacl to get and set access control lists?

The getfacl command displays the access permissions of files and directories with file name, owner, group and the ACL’s (Access Control List). When we create a directory it is created with a default set of access permissions and by using getfacl we will be able to see the access rights.

What happens if there is no default ACL in setfacl?

If no Default ACL exists, no warnings are issued. Do not recalculate the effective rights mask. The default behavior of setfacl is to recalculate the ACL mask entry, unless a mask entry was explicitly given. The mask entry is set to the union of all permissions of the owning group, and all named user and group entries.

How does setfacl restore a complete directory backup?

Restore a permission backup created by ” getfacl -R ” or similar. All permissions of a complete directory subtree are restored using this mechanism. If the input contains owner comments or group comments, setfacl attempts to restore the owner and owning group.

How does setfacl set, remove, and change ACLS?

] setfacl sets (replaces), modifies, or removes the access control list (ACL) to regular files and directories. It also updates and deletes ACL entries for each file and directory that was specified by path. If path was not specified, then file and directory names are read from standard input (stdin).

Is there a problem with setfacl in RHEL 7.2?

I had problem using setfacl for group to access directory /subdirectory of other user at RHEL 7.2 (and 6.7 as well) . Followings are my screen shots after each change