Grant read access (r) to a file to all members of your group (g):
chmod g+r file-name
Grant read access to a directory to all members your group:
chmod g+rx directory-name
Note that "execute" permission is required in order to read a directory.
Grant read permissions to everyone on the system to a file which you own so that everyone may read it: (u)ser, (g)roup and (o)ther.
chmod ugo+r file-name
Grant read permissions on a directory to everyone on the system:
chmod ugo+rx directory-name
Grant modify or delete permissions to a file which you own for everyone in the group:
chmod ugo+rw file-name
Note: In order for modify and delete permissions to be useful, one must be able to modify the directory in which the file is located: chmod ugo+rwx ./
Deny read access to a file by everyone except yourself:
chmod go-r file-name
Allow everyone in your group to be able to modify the file:
chmod 660 file-name
No comments:
Post a Comment