Skip to content

How to share directories for collaborative work

Introduction

Often, users collaborating on a project wish to share their files with others in a common set of directories. Unfortunately, many decide to use a single login username as a group user. For security reasons, the sharing of accounts is explicitly forbidden by HPC policy, and such practices may result in the suspension of access for all involved.

There are two approaches to sharing files.

Read-only share

The first method does restrict access to read-only, but may be setup by anyone. The caveat is any user on the system will be able to read the files, not just the intended collaborators. To achieve this, simply make sure that all directories in the path have read/execute permission for the group, and that the files had read permission for the group.

Set group read/execute permission with a command like:

  chmod 750 dirname

or

  chmod g+rx dirname

Likewise, group read permission on a file can be set with:

  chmod 640 filename

or

  $ chmod g+r filename

Note that the numerical method is preferred.

Project storage allocation

The second method allows a group of collaborators to have full access to files: read, write, and/or, execute. This requires that a PI-qualified individual applies for a /project storage allocation. As part of the application, request that a user group be created to allow shared access and provide a list of user names to be included in the group. Members of the group can then place files in the /project directory, and change group ownership to the storage group. Other members of the group will then be able to access the files, include changing permissions.

Not every machine has /project space, but those that do allow allocations to be applied for via the appropriate allocation request pages

Contact us for advice or additional information.

More Information