User and Group Management: Sharing a Folder or Directory

Back to documentation index

In many circumstances, a POD account owner with managed users will wish to share files with the some or all of his/her managed users. The best way to accomplish this is through the use of user groups, which are UNIX user groups on the cluster, and setting up a directory.

The following instructions are to be followed by the account owner.

  1. In the POD Portal, create a new group. Add yourself and all other users needing access to the shared folder.
  2. SSH into the cluster (login node). Create the directory to be used for shared access in $HOME.
    jsmith@vm99:/home/jsmith# cd
    jsmith@vm99:/home/jsmith# mkdir group_dir
    
  3. Next, grant group access to that folder by changing the group ownership and permissions. Substitute newgroup with the name of the group you created in the portal.
    jsmith@vm99:/home/jsmith# chgrp newgroup ~/group_dir
    jsmith@vm99:/home/jsmith# chmod 2750 ~/group_dir
    
  4. Now, allow group members to cd through your $HOME to the group folder you just created by changing group ownership.
    jsmith@vm99:/home/smith# chgrp newgroup ~
    
    Your $HOME permissions are by default 0750. This allows members of newgroup to read any files in your $HOME and to read and write files in the $HOME/group_dir. Alternatively you can set your $HOME permissions to 0710. This would prevent members of newgroup from reading files in your $HOME. They would need to cd directly to $HOME/newgroup for reading and writing.