cc_staff
52
edits
No edit summary |
No edit summary |
||
Line 124: | Line 124: | ||
<!--T:19--> | <!--T:19--> | ||
To allow a single person with username <tt>smithj</tt> to have read and execute permission on the file <tt>my_script.py</tt>, use: | To allow a single person with username <tt>smithj</tt> to have read and execute permission on the file <tt>my_script.py</tt>, use: | ||
<source lang="console"> | |||
[user@server] setfacl -m u:smithj:rx my_script.py | |||
</source> | |||
<!--T:20--> | <!--T:20--> | ||
To allow read and write access to everything within a certain directory (for example ''/home/smithj/projects/def-smithj/shared_data'') for particular group (for example ''wg-datasharing''), use the following commands: | To allow read and write access to everything within a certain directory (for example ''/home/smithj/projects/def-smithj/shared_data'') for particular group (for example ''wg-datasharing''), use the following commands: | ||
<source lang="console"> | |||
setfacl -R -m g:wg-datasharing:rwx /home/smithj/projects/def-smithj/shared_data | [user@server] setfacl -d -m g:wg-datasharing:rwx /home/smithj/projects/def-smithj/shared_data | ||
[user@server] setfacl -R -m g:wg-datasharing:rwx /home/smithj/projects/def-smithj/shared_data | |||
</source> | |||
First command sets default access rules to directory <code>/home/smithj/projects/def-smithj/shared_data</code>, so any file or directory created within it will inherit the same ACL rule. It is required for '''new''' data. | First command sets default access rules to directory <code>/home/smithj/projects/def-smithj/shared_data</code>, so any file or directory created within it will inherit the same ACL rule. It is required for '''new''' data. | ||
Second command sets ACL rules to directory <code>/home/smithj/projects/def-smithj/shared_data</code> and all its content currently in it. So it is applicable only to '''existing''' data. | Second command sets ACL rules to directory <code>/home/smithj/projects/def-smithj/shared_data</code> and all its content currently in it. So it is applicable only to '''existing''' data. |