Skip to content

Commit 8df839c

Browse files
committed
nfsv4 aces/acls
1 parent 3a8708b commit 8df839c

1 file changed

Lines changed: 32 additions & 1 deletion

File tree

docs/hpc/03_storage/08_sharing_data_on_hpc.md

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ An Access Control List is composed of Access Control Entries, each of which has
1717
| :------- | :---------- |
1818
| *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. |
1919
| *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`** |
2121
| *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).|
2222

2323

@@ -26,3 +26,34 @@ The following commands are available:
2626
- `nfs4_setfacl` to set ACEs
2727
- `nfs4_editfacl` to edit ACEs
2828
- `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

Comments
 (0)