Sharing Files with other Users on the supercomputers
Overview
Sharing files with other users requires a few steps, and to ensure the safety of your files, this process allows the recipient to open up their storage to users for a controlled duration of time. The process outline goes like this:
Recipient creates a directory with world-writable permissions
Sender copies files from their storage into the shared directory
Recipient revokes writable permissions on the directory
Recipient now has their copy of the files
1: Recipient creating receiving directory
This example uses <sender>
and <recepient>
to be replaced by actual ASURITEs.
chmod -R o+rx /scratch/<recipient>
install -d -m 777 /scratch/<recipient>/receiving_dir
The first command makes the recipient scratch directory accessible to others. The second command creates a directory named receiving_dir
in the /scratch/<recipient>
directory with full permissions (read, write, and execute) for the owner, group, and others.
Doing this with /home directories is highly discouraged; /scratch is recommended to sidestep numerous technical issues that arise trying to open up permissions in
2: Sender copies files to the receiving directory
chmod o+rwx /path/to/mydirectory_of_files
cp -R /path/to/mydirectory_of_files /scratch/<recipient>/receiving_dir
chmod o-rwx /path/to/mydirectory_of_files
The first line opens the file permissions so others can read, write, and execute this file. The second line makes a duplication of the file and gives it to the receiving directory. The third line reverts the permissions of the original file, but the duplication won’t be affected on the recipient side.
3: Recipient revokes permissions on receiving directory
After sending and receiving files, the recipient can choose to revoke permissions.
chmod o-rwx /scratch/<recipient>
# this stops other users from navigating or changing the files saved here
This process is one of many ways in which files might be shared with other users; it requires steps to be performed by both the sender and receiver.
For regular collaboration frequent file sharing, project storage (purchasable) might be a more sustainable/frictionless experience.
Additional Help
We also offer a series of Educational Opportunities and Workshops.