Difference between revisions of "Sharing Within A Cluster"

From UFRC
Jump to navigation Jump to search
Line 6: Line 6:
  
 
* To make the data accessible to all group members, but not to the users outside of the group edit the <code>'.bashrc'</code> file in each group member's home directory and add the following line to it:
 
* To make the data accessible to all group members, but not to the users outside of the group edit the <code>'.bashrc'</code> file in each group member's home directory and add the following line to it:
  umask 0007
+
  umask 007
 
After that every newly created file will have "-rw-rw----" permissions and every new directory will have "-rwxrwx---" permissions giving full access to the user and the group, but not to anyone else.
 
After that every newly created file will have "-rw-rw----" permissions and every new directory will have "-rwxrwx---" permissions giving full access to the user and the group, but not to anyone else.
 
* To change permissions on an existing directory tree to correspond to the above set change to the directory above the one you'd like to start from and run
 
* To change permissions on an existing directory tree to correspond to the above set change to the directory above the one you'd like to start from and run

Revision as of 21:27, 24 February 2022

Purpose

Allows users to share files between themselves on the cluster

Method

For groups that want several people to work on the same data it may be useful to read the following information:

  • To make the data accessible to all group members, but not to the users outside of the group edit the '.bashrc' file in each group member's home directory and add the following line to it:
umask 007

After that every newly created file will have "-rw-rw----" permissions and every new directory will have "-rwxrwx---" permissions giving full access to the user and the group, but not to anyone else.

  • To change permissions on an existing directory tree to correspond to the above set change to the directory above the one you'd like to start from and run
find DIRECTORY -type d -exec chmod 770 {} \;
find DIRECTORY -type f -exec chmod 660 {} \;

where 'DIRECTORY' is the name of the topmost directory in the tree you want to change permissions on. Note that the user who runs the above commands must be the current owner of the directory tree. The commands may take a while to run if the directory tree is large.