-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adds section on sharing files with other Cirrus users #340
Draft
clairbarrass
wants to merge
1
commit into
EPCCed:main
Choose a base branch
from
clairbarrass:cbarrass-epcc/cirrus-data-sharing
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -220,6 +220,98 @@ archive and twice in the path on the new /home file system. | |
|
||
The capacity of the home file system is much larger than the work file system so you should move data to home rather than work. | ||
|
||
|
||
|
||
## Sharing data with other Cirrus users | ||
|
||
How you share data with other Cirrus users depends on whether or not | ||
they belong to the same project as you. Each project has two shared | ||
folders that can be used for sharing data. | ||
|
||
### Sharing data with Cirrus users in your project | ||
|
||
Each project has an *inner* shared folder. | ||
|
||
/work/[project code]/[project code]/shared | ||
|
||
This folder has read/write permissions for all project members. You can | ||
place any data you wish to share with other project members in this | ||
directory. For example, if your project code is x01 the inner shared | ||
folder would be located at `/work/x01/x01/shared`. | ||
|
||
### Sharing data with Cirrus users within the same project group | ||
|
||
Some projects have [subprojects](#subprojects) (also often referred to as a 'project groups' or sub-budgets) e.g. project e123 might have a project group e123-fred for a sub-group of researchers working with Fred. | ||
|
||
Often project groups do not have a disk quota set, but if the project PI [does set up a group disk quota](https://epcced.github.io/safe-docs/safe-for-managers/#how-can-i-create-a-quota-for-a-project-group-or-move-space-between-quotas) e.g. for /work then additional directories are created: | ||
|
||
/work/e123/e123-fred | ||
/work/e123/e123-fred/shared | ||
/work/e123/e123-fred/<user> (for every user in the group) | ||
|
||
and all members of the ```/work/e123/e123-fred``` group will be able to use the ```/work/e123/e123-fred/shared``` directory to share their files. | ||
|
||
!!! Note | ||
If files are copied from their usual directories they will keep the original ownership. To grant ownership to the group: | ||
|
||
```chown -R $USER:e123-fred /work/e123/e123-fred/ ...``` | ||
|
||
|
||
### Sharing data with all Cirrus users | ||
|
||
Each project also has an *outer* shared folder.: | ||
|
||
/work/[project code]/shared | ||
|
||
It is writable by all project members and readable by any user on the | ||
system. You can place any data you wish to share with other Cirrus | ||
users who are not members of your project in this directory. For example, | ||
if your project code is x01 the outer shared folder would be located | ||
at `/work/x01/shared`. | ||
|
||
### Permissions | ||
|
||
You should check the permissions of any files that you place in the shared area, | ||
especially if those files were created in your own Cirrus account. Files of the | ||
latter type are likely to be readable by you only. | ||
|
||
The `chmod` command below shows how to make sure that a file placed in the outer | ||
shared folder is also readable by all Cirrus users. | ||
|
||
chmod a+r /work/x01/shared/your-shared-file.txt | ||
|
||
Similarly, for the inner shared folder, `chmod` can be called such that read | ||
permission is granted to all users within the x01 project. | ||
|
||
chmod g+r /work/x01/x01/shared/your-shared-file.txt | ||
|
||
If you're sharing a set of files stored within a folder hierarchy the `chmod` | ||
is slightly more complicated. | ||
|
||
chmod -R a+Xr /work/x01/shared/my-shared-folder | ||
chmod -R g+Xr /work/x01/x01/shared/my-shared-folder | ||
|
||
The `-R` option ensures that the read permission is enabled recursively and | ||
the `+X` guarantees that the user(s) you're sharing the folder with can access | ||
the subdirectories below `my-shared-folder`. | ||
|
||
### Sharing data between projects and subprojects | ||
|
||
Every file has an *owner* group that specifies access permissions for users | ||
belonging to that group. It's usually the case that the group id is synonymous | ||
with the project code. Somewhat confusingly however, projects can contain | ||
groups of their own, called [subprojects](#sharing-data-with-cirrus-users-within-the-same-project-group), which can be assigned disk space | ||
quotas distinct from the project. | ||
|
||
chown -R $USER:x01-subproject /work/x01/x01-subproject/$USER/my-folder | ||
|
||
The `chown` command above changes the owning group for all the files within | ||
`my-folder` to the `x01-subproject` group. This might be necessary if previously | ||
those files were *owned* by the x01 group and thereby using some of the x01 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ditto; maybe ".. files belonged to the x01 group..." |
||
disk quota. | ||
|
||
|
||
|
||
## Archiving | ||
|
||
If you have related data that consists of a large number of small files | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd probably avoid phrases such as 'to grant ownership to the group' (the owner is always the user, and users can't use
chown
to change the owner). One could say e.g., 'to change the group the file belongs to...'.