Permissions Flashcards
7 cards from real Linux practice questions. Tap to flip, then mark Knew It or Still Learning โ missed cards come back until you master them.
Read the first 7 Permissions flashcards as text
What is the default umask for a regular (non-root) user on most Linux systems?
Answer: 022
A umask of 022 is the most common default for regular users, resulting in 644 for files and 755 for directories.
Which command grants user 'carol' read and write ACL permissions on report.txt?
Answer: setfacl -m u:carol:rw report.txt
The `setfacl -m u:carol:rw` command modifies the ACL to add or update the named user entry with read and write permissions.
If a file has permissions rwSr--r--, what does the uppercase 'S' indicate?
Answer: The setuid bit is set but the owner execute bit is not set
An uppercase 'S' in the setuid position means the setuid bit is set but the owner does not have execute permission, making it a non-functional setuid.
What is the minimum permission a user needs on a directory to create a file inside it?
Answer: Write and execute permissions on the directory
Creating a file in a directory requires both write (to add the directory entry) and execute (to traverse the directory) permissions.
How do you remove all ACL entries from a file and revert to standard permissions?
Answer: setfacl -b file.txt
The `setfacl -b` option removes all extended ACL entries, leaving only the base owner/group/other permissions.
A new file is created in a directory with the setgid bit set. What group will the file belong to?
Answer: The directory's group
When the setgid bit is set on a directory, new files created inside inherit the directory's group ownership rather than the creator's primary group.
Which symbolic chmod expression removes execute permission from all categories (owner, group, others)?
Answer: All of the above
All three expressions are equivalent: 'a' means all, omitting the target also defaults to all, and explicitly listing ugo covers all categories.