A common way to share files and/or directories with group members or others is to use the chmod command to change the permissions. However, chmod has limitations, so you may sometimes choose to use Access Control Lists (ACLs).
When you issue the command chmod g+rx filename, for example, all the members in your group (g) gain read (r) and search/execute (x) access to that file, as shown below:
% ls -l filename
-rw------- 1 zsmith s0101 9 Jun 10 12:11 filename
% chmod g+rx filename
% ls -l filename
-rw-r-x--- 1 zsmith s0101 9 Jun 10 12:11 filename
However, chmod does not allow you to select which members of your group or which specific individuals outside of your group can access your files/directories. ACLs provide a mechanism for greater control of file sharing. There are two ACL commands:
A detailed usage explanation of getfacl and its options can be found via man getfacl.
Note: Before you grant another user or group access to certain files or directories, make sure that access to the parent directory (where the files or directories reside) is also allowed.
Example 1
To allow another user (jbrown) to have read/execute (rx) permission on a file (filename) and to view the ACL before and after an ACL change: