RHCSA File Permissions and ACLs Flashcards
7 cards from real RHCSA practice questions. Tap to flip, then mark Knew It or Still Learning โ missed cards come back until you master them.
Read the first 7 RHCSA File Permissions and ACLs flashcards as text
Which command removes all ACL entries from the file /tmp/data.txt, reverting to standard permissions?
Answer: setfacl -b /tmp/data.txt
setfacl -b removes all extended ACL entries, leaving only the base POSIX permissions.
When a directory has the setgid bit set, what happens to files created inside it?
Answer: New files inherit the group ownership of the directory
The setgid bit on a directory forces new files to inherit the directory's group rather than the creator's primary group.
Which ls option displays a '+' symbol to indicate a file has extended ACLs?
Answer: ls -l
ls -l appends a '+' after the permission bits when extended ACLs are present on a file.
A file is owned by user bob and group sales. User carol is not in group sales. Which minimal ACL command grants carol write access to the file?
Answer: setfacl -m u:carol:w file
setfacl -m u:carol:w adds a user-specific ACL entry granting write permission to carol.
What does the ACL mask entry control?
Answer: The maximum effective permissions for named users and groups in the ACL
The ACL mask limits the maximum effective permissions granted to named users, named groups, and the owning group.
How do you set a default ACL on directory /project so all new files automatically grant group 'devs' read-write access?
Answer: setfacl -m d:g:devs:rw /project
The 'd:' prefix in setfacl -m sets a default ACL entry that is inherited by newly created files.
A file has octal permissions 2770. What special bit is set?
Answer: setgid
The leading '2' in octal notation represents the setgid bit.