Sharing directories: Difference between revisions

From LWP-Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 5: Line 5:


== How to use NFSv4 ACLs ==
== How to use NFSv4 ACLs ==
You can find a detailed manual [https://www.osc.edu/resources/getting_started/howto/howto_use_nfsv4_acl | here].<br>
You can find a detailed manual [https://www.osc.edu/resources/getting_started/howto/howto_use_nfsv4_acl here].<br>
On the command-line you can give the following command to get more abbreviated usage information and some examples:
On the command-line you can give the following command to get more abbreviated usage information and some examples:
   info nfs4_setfacl
   info nfs4_setfacl

Latest revision as of 15:59, 17 October 2022

If you need to share a directory between a number of people, you can use part of your home directory.
You can also ask for a separate, appropriately-named, directory outside of your homedir, of which you will be the owner. More information on how to do that can be found here.
You can grant others access by using Access Control Lists, ACLs from here on.

How to use NFSv4 ACLs

You can find a detailed manual here.
On the command-line you can give the following command to get more abbreviated usage information and some examples:

 info nfs4_setfacl

Some examples of more commonly used commands

To allow someone read access to a file or directory:

 nfs4_setfacl -a A::<username>@rug.nl:RX <dir/file>

Note: Use upper case RWX instead of lower case.

It is possible to set 'default' ACLs. New files and/or sub-directories can automatically inherit these ACLs.
To have new sub-directories inherit the ACL of it's parent:

 nfs4_setfacl -a A:d:<username>@rug.nl:RX <dir>

And to have new files inherit the ACL:

 nfs4_setfacl -a A:f:<username>@rug.nl:R <dir>

The ACLs can also be edited by using the editor command:

 nfs4_editfacl <dir/file>

Note: Altough you'll see different permission options, you can just use RWX, this gets translated for you automatically when you save your edit.