Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
hpc-compendium
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ZIH
hpcsupport
hpc-compendium
Commits
5eb3794e
Commit
5eb3794e
authored
2 years ago
by
Jan Frenzel
Browse files
Options
Downloads
Patches
Plain Diff
Added chmod and chown explanations to data_sharing.md.
parent
b1733dc4
No related branches found
Branches containing commit
No related tags found
2 merge requests
!633
Automated merge from preview to main
,
!448
WIP: Page on sharing data
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
doc.zih.tu-dresden.de/docs/data_lifecycle/data_sharing.md
+56
-1
56 additions, 1 deletion
doc.zih.tu-dresden.de/docs/data_lifecycle/data_sharing.md
with
56 additions
and
1 deletion
doc.zih.tu-dresden.de/docs/data_lifecycle/data_sharing.md
+
56
−
1
View file @
5eb3794e
# Sharing Data
This page should provide you some commands to share your data with other users or projects.
## Grant access on some file or directory to persons in your project
If all persons that should be able to access your data are in the same project, you can give them
access to your workspace, e. g.
`input-data`
via the following commands:
```
console
marie@login$
id
--group
--name
p_number_crunch
marie@login$
chown
-R
marie:p_number_crunch /scratch/ws/1/marie-input-data
```
Now, everyone who is in project
`p_number_crunch`
should be able to access your data. If this is not
the case, you should check whether the file that your colleague wants to access is readable for the
group (
`r`
permission is set for the group) and every parent directory of that file is searchable
for the group (
`x`
permission is set for the group). For example, in the following case, a colleague
of
`marie`
cannot access
`data-file`
because the base directory
`.`
is not searchable for the group
as it does not have the
`x`
permission, even though the file has the permission
`r`
set for the
group. Thus,
`marie`
has to make the directory searchable by using
`chmod`
:
```
console
marie@login$
ls
-la
/scratch/ws/1/marie-input-data
dr-xr----- 4 marie p_number_crunch 4096 27. Jun 17:13 .
drwxr-xr-x 444 operator adm 151552 14. Jul 09:41 ..
dr-xr----- 2 marie p_number_crunch 4096 27. Jun 17:13 data-file
dr-xr-x--- 2 marie p_number_crunch 4096 28. Jun 09:45 env.sh
marie@login$
chmod
g+x /scratch/ws/1/marie-input-data
marie@login$
ls
-la
/scratch/ws/1/marie-input-data
dr-xr-x--- 4 marie p_number_crunch 4096 27. Jun 17:13 .
drwxr-xr-x 444 operator adm 151552 14. Jul 09:41 ..
dr-xr----- 2 marie p_number_crunch 4096 27. Jun 17:13 data-file
dr-xr-x--- 2 marie p_number_crunch 4096 28. Jun 09:45 env.sh
```
!!! danger "New file inherits group and permission of the creator"
When a user creates a file, the created file is associated to that user and inherits the user's
default group. If the user is in multiple groups/projects, he/she has to ensure, that the a new
file is associated with the project's group. This can be done using `chown` and `chmod` as shown
above. Another possibility is to use an environment file `env.sh` with the following content:
```bash
newgrp p_number_crunch # files should have this group by default
umask o-rwx # prevent creating files that allow persons not in this group (a.k.a. others) to read, write or execute something
```
Before creating new files, users can now load this file using `source` in order to ensure that
new files automatically get the right group:
```console
marie@login$ cd /scratch/ws/1/marie-input-data
marie@login$ source env.sh
bash-4.2$ touch new-file #create a new file
```
Read on, if you want to restrict access to specific persons outside of your group, but don't want to
permit everyone to access your data.
##
Managing A
ccess
C
on
trol Lis
ts
##
Grant a
ccess on
some file or directory to persons from various projec
ts
[
Access Control Lists
](
https://en.wikipedia.org/wiki/Access-control_list
)
(
ACLs
)
can be used, when
`chmod`
is not sufficient anymore, e. g. because you want to permit accessing a particular file for
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment