Sharing directories: Difference between revisions

From LWP-Wiki
Jump to navigation Jump to search
(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
 
(7 intermediate revisions by 2 users not shown)
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, and to which you can grant others access using ACL's.
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''', '''ACLs''' from here on.<br>
 
== 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>
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
And also see [http://www.cs.rug.nl/~jurjen/NFSv4/ch04.html#ACLs the NFSv4 HowTo].<br/>
<br/>
Please be aware that we are fairly new to ACL's over NFSv4, and this service is still a bit experimental.
Hier is een uitgebreide handleiding:
https://www.osc.edu/book/export/html/4523


Hier alvast de belangrijkste dingen in 't kort. Om een directory of file
== Some examples of more commonly used commands ==
leesbaar te maken:
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>'''
Met RWX in hoofdletters ipv. kleine letters.
''Note: Use upper case '''RWX''' instead of lower case.''


Je kunt 'default' ACLs zetten voor een directory of file; ACL's die een
It is possible to set 'default' ACLs. New files and/or sub-directories can automatically inherit these ACLs.<br>
nieuwe file automatisch krijgen. Om te zorgen dat nieuwe sub directories
To have new sub-directories inherit the ACL of it's parent:
dezelfde ACL overerven:
  nfs4_setfacl -a A:d:'''<username>'''@rug.nl:RX '''<dir>'''
$ nfs4_setfacl -a A:d:<username>@rug.nl:RX <dir>
And to have new files inherit the ACL:
Voor nieuwe files:
  nfs4_setfacl -a A:f:'''<username>'''@rug.nl:R '''<dir>'''
$ nfs4_setfacl -a A:f:<username>@rug.nl:R <dir>


Je kunt de ACLs ook bewerken met nfs4_editfacl <file/dir>. Ook al zie je
The ACLs can also be edited by using the editor command:
daar andere permissies, kun je zelf gewoon RWX gebruiken, dat wordt
  nfs4_editfacl '''<dir/file>'''
automatisch vertaald.
''Note: Altough you'll see different permission options, you can just use '''RWX''', this gets translated for you automatically when you save your edit.''

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.