Skip to Content
Linux Administration Cookbook
book

Linux Administration Cookbook

by Adam K. Dean
December 2018
Beginner
826 pages
22h 54m
English
Packt Publishing
Content preview from Linux Administration Cookbook

See also

One thing we didn't cover in this section were access control lists (ACLs) that can be used to further extend a file's permissions.

Start by putting a small command in our permissionfile to make it execute something:

$ echo "printf 'Fire indeed hot'" > permissionfile

Say we want to view our entire access control list for a file; we would use getfacl:

$ getfacl permissionfile # file: permissionfile# owner: vagrant# group: rootuser::rw-group::r-xother::rw-

Here, we can see the owner is vagrant, and the user has rw.

But, what if we wanted Packt to be able to execute the file, without impacting the other permissions? At the moment, Packt can't because it's not in the root group.

One potential solution is setfacl:

$ setfacl -m u:packt:rwx ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Practical Linux Security Cookbook - Second Edition

Practical Linux Security Cookbook - Second Edition

Tajinder Kalsi
Mastering Linux Administration

Mastering Linux Administration

Alexandru Calcatinge, Julian Balog

Publisher Resources

ISBN: 9781789342529Supplemental Content