Sharing directories: Difference between revisions
(Created page with "Category:misc-faq If you need to share a directory between a number of people, you can use part of your home directory.<br/> You can also ask for a separate, appropriately...") |
No edit summary |
||
Line 1: | Line 1: | ||
[[Category:misc-faq]] | [[Category:misc-faq]] | ||
If you need to share a directory between a number of people, you can use part of your home directory.<br | If you need to share a directory between a number of people, you can use part of your home directory.<br> | ||
You can also ask for a separate, appropriately-named, directory outside of your homedir, of which you will be the owner | 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 [[Project Directories| here]].<br> | ||
You can grant others access by using '''Access Control Lists''', '''ACL'''s from here on.<br> | |||
== How to use NFSv4 ACLs == | |||
You can find a detailed manual [https://www.osc.edu/book/export/html/4523| here].<br> | |||
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 | ||
== 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> | 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.<br> | |||
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>''' | |||
Altough you'll see different permission options, you can just use '''RWX''', this gets translated for you automatically when you save your edit. |
Revision as of 13:49, 9 April 2021
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>
Altough you'll see different permission options, you can just use RWX, this gets translated for you automatically when you save your edit.