You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/hpc/03_storage/08_sharing_data_on_hpc.md
+32-1Lines changed: 32 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,7 +17,7 @@ An Access Control List is composed of Access Control Entries, each of which has
17
17
| :------- | :---------- |
18
18
|*type*| Kind of ACE entry, we recommend only using A (access). Deny type entries make the ACE more complex to reason about when compared to using only access type entries for the same configuration. |
19
19
|*flags*| Inheritance flags which apply to directories and control how ACEs are inherited:<br/>- **`f`**: files inherit ACEs, but inheritance flags are not set on the files<br/>- **`d`**: directories inherit both the ACE and the inheritance flags<br/>- **`i`**: only inherit the inheritance flags, ACEs do not apply to this directory<br/>- **`n`**: directories only inherit ACEs, not the inheritance flags<br/>- **`g`**: only used when the principal is a group |
20
-
|*principal*| The user or group to apply the ACE to, with the following special principals:<br/>- **`OWNER`**<br/>- **`GROUP`**<br/>- **`EVERYONE`**|
20
+
|*principal*| The user (identified by `NetID`) or group to apply the ACE to, with the following special principals:<br/>- **`OWNER`**<br/>- **`GROUP`**<br/>- **`EVERYONE`**|
21
21
|*permissions*| The level of access to grant. Aliases for most common uses include: the full set of permission entry types are listed below for reference, with the most commonly used options being:<br/>- **`R`**: Read, alias for `rntcy`<br/>- **`W`**: Write, alias for `watTNcCy`<br/>- **`X`**: Execute, alias for `watTNcCy` <br/> The full list of available options can be found [here](https://man7.org/linux/man-pages/man5/nfs4_acl.5.html).|
22
22
23
23
@@ -26,3 +26,34 @@ The following commands are available:
26
26
-`nfs4_setfacl` to set ACEs
27
27
-`nfs4_editfacl` to edit ACEs
28
28
-`nfs4_getfacl` to view ACLs
29
+
with the usage described in the following examples.
30
+
31
+
#### Give someone access to read a particular file
32
+
Append the ACL for that file by adding an ACE via
33
+
```sh
34
+
nfs4_setfacl -a "A::NetID:R" filename
35
+
```
36
+
where the `-a` flag signifies "append". Since inheritance flags are only applicable to directories and the principal is not a group, no flags are needed.
37
+
38
+
#### Show current access properties
39
+
40
+
Create an empty file and viwe the default ACEs it:
41
+
```sh
42
+
~> touch temp
43
+
~> nfs4_getfacl temp
44
+
# file: temp
45
+
A::OWNER@:rwatTnNcy
46
+
A:g:GROUP@:rtncy
47
+
A::EVERYONE@:rtncy
48
+
```
49
+
View changes after granting a collaborator read permissions:
50
+
```sh
51
+
~> nfs4_setfacl -a "A::collaborator-netid:R" temp
52
+
~> nfs4_getfacl temp
53
+
# file: temp
54
+
A::collaborator-netid@hpc.nyu.edu:rtncy
55
+
A::OWNER@:rwatTnNcy
56
+
A:g:GROUP@:rtncy
57
+
A::EVERYONE@:rtncy
58
+
```
59
+
where `collaborator-netid` refers to the `NetID` of your collaborator.
0 commit comments