โ† All Linux Flashcard Decks

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
  1. 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.

  2. 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.

  3. 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.

  4. 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.

  5. 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.

  6. 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.

  7. 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.