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 octal value sets the setuid bit along with rwxr-xr-x permissions?
Answer: 4755
The setuid bit is represented by the leading 4 in octal, so 4755 means setuid + rwxr-xr-x.
A user runs ls -l and sees -rwsr-xr-x on /usr/bin/passwd. What does the 's' in the owner execute position indicate?
Answer: The setuid bit is set and the file is executable
A lowercase 's' in the owner's execute position means the setuid bit is set and the owner execute bit is also set.
Which command recursively changes permissions for all files and directories under /var/www to 755?
Answer: chmod -R 755 /var/www
The -R flag in chmod applies the permission change recursively to all files and subdirectories.
What does ACL stand for in the context of Linux file permissions?
Answer: Access Control List
ACL stands for Access Control List, which allows more granular permission assignments beyond the traditional owner/group/other model.
Which command is used to view the ACL entries on a file?
Answer: getfacl file.txt
The `getfacl` command displays the access control list entries for a file or directory.
A file is owned by user 'alice' and group 'staff'. User 'bob' is in the 'staff' group. The file has permissions rw-r-----. Can bob read the file?
Answer: Yes, because bob is in the staff group which has read permission
Bob belongs to the 'staff' group, which has read (r--) permission, so he can read the file.
What permission mode does chmod 000 set on a file?
Answer: Removes all read, write, and execute permissions for everyone
chmod 000 removes all permissions from owner, group, and others, making the file inaccessible to everyone except root.