Linux Fundamentals Flashcards
At what 3 levels can file permissions be applied?
User, group, other
What is the command to change file permissions?
chmod
What are the numerical values of read, write, and execute respecivley?
4, 2, 1
What is the declarative way of adding/removing file permissions?
u/g/o/a +/- r/w/x (e.g. u+w == give write permissions to user, ug-rw == remove read/write for user and group)
Why do directories need execute permissions?
To allow cd to execute against it so it can be accessed
What is the numerical value of no permissions on a file/dir?
0
What commands changes the ownership of a file?
chown
What commands changes the ownership of a file?
chgrp
Who has complete control over the files in a users home directory besides root?
The user - drwxr-x— permissions state that the user can read, write, and execute on any file regardless of the owner (even root!)
What is an ACL?
Access Control List
How does an ACL work with UNIX style permissions?
ACLs provide more fine grained controls over permissions, allowing specific users or groups access to disk resources
What command sets ACL permissions?
setfacl
What command gets ACL permissions?
getfacl
Give an example of the setfacl function
setfacl -m u:<user>:rw /path/to/file</user>
How can a single permission be removed for a single user using ACLs?
setfacl -x u:user /path/to/file