rsnt_translations
56,420
edits
No edit summary |
No edit summary |
||
Line 190: | Line 190: | ||
<!--T:8--> | <!--T:8--> | ||
The file permissions discussed above have been available in Unix-like operating systems for decades now but they are very coarse-grained. The whole set of users is divided into just three categories: the owner, the group, and everyone else. What if you want to allow someone who isn't in a group to read a file - do you really need to make the file readable by everyone in that case? The answer, happily, is no. Our national systems offer ''access control lists'' (ACLs) to enable permissions to be set on a user-by-user basis if desired. The two commands needed to manipulate these extended permissions are | The file permissions discussed above have been available in Unix-like operating systems for decades now but they are very coarse-grained. The whole set of users is divided into just three categories: the owner, the group, and everyone else. What if you want to allow someone who isn't in a group to read a file - do you really need to make the file readable by everyone in that case? The answer, happily, is no. Our national systems offer ''access control lists'' (ACLs) to enable permissions to be set on a user-by-user basis if desired. The two commands needed to manipulate these extended permissions are | ||
* < | * <code>getfacl</code> to see the ACL permissions, and | ||
* < | * <code>setfacl</code> to alter them. | ||
==== Sharing a single file ==== <!--T:19--> | ==== Sharing a single file ==== <!--T:19--> | ||
To allow a single person with username < | To allow a single person with username <code>smithj</code> to have read and execute permission on the file <code>my_script.py</code>, use: | ||
<source lang="console"> | <source lang="console"> | ||
$ setfacl -m u:smithj:rx my_script.py | $ setfacl -m u:smithj:rx my_script.py |