'read' Permission To A Selected Group Of Users, On A file
- Create a file with 'read' access to a selected Group of Users:
- Ask the system administrator to create a new Group containing this
list of Users.
Note: We must be part of the Group, in order to be allowed to
turn it into the Group-owner of the file.
- Make the new Group be the Group-owner of the file:
chgrp <group_name> <file_name>
- Give 'read' access to "Group-owner":
chmod g+r <file_name>
- make sure "others" don't have 'read' access to this file:
chmod o-r <file_name>
- Give 'x' access to our home directory, so the Users will be able to
reach for the file under it:
chmod a+x ~
- Note: if the file is in a sub-directory under our home
directory, we must give 'x' access to all the directories along
the way to this file.
Originally written by
guy keren