December 2017
Intermediate to advanced
410 pages
11h 5m
English
These additional access controls can be set with help of the setfacl command. This is the basic syntax for the setfacl command:
# setfacl -m "u:user:permissions" file
So, in the use case that we discussed previously, if we want to add Bob and Andy to have read access to file.txt and James to have access to rwx, then the command would be as follows:
[root@ip-10-61-0-195 tmp]# setfacl -m u:bob:r file.txt[root@ip-10-61-0-195 tmp]# setfacl -m u:andy:r file.txt[root@ip-10-61-0-195 tmp]# setfacl -m u:james:rwx file.txt
If we now look at the permission of files.txt, it will look like this:
-rw-rwxr--+ 1 kplabs kplabs 0 Jun 24 08:26 file.txt
Notice the + sign added. This means that there is additional ACL applied to the file apart from the ...
Read now
Unlock full access