Sometimes, different users create a new file in the same directory, but other users cannot access it.
Because this default creates the user's Umask value for the file, only the user and the group can access it.
However, we cannot change the user's umask value because of this problem, it will not be safe.
All we're going to use setfacl this command,
setfacl-d--set other:rw/opt/.cmdlog/
Then it's not. The user created the file in this directory, and other has RW permissions.
-D is to have subdirectories inherit parent directory permissions
user::rw-defines the acl_user_obj, stating that file owner has read and write permission
user:john:rw-defines acl_user so that user John has read and write access to the file, which is what we started to achieve.
group::rw-defines acl_group_obj, stating that the GROUP of files has read and write permission
group:dev:r--defines the acl_group so that the dev group has Read permission to the file
mask::rw-defines the permissions for Acl_mask for Read and write
other::r--defines the permissions for the Acl_other as read
Directory permission Settings Setfacl