A directory named /srv/projects is owned by root and the group devteam. It must be configured so that new files and subdirectories automatically inherit the devteam group, only the file owner (or root) can delete or rename items in the directory, and users who are not in devteam have no access at all. Which single command best meets all of these requirements?
The special-permission digit 3 (1 + 2) sets both the sticky bit and the setgid bit. In the mode 3770, the remaining digits give rwx to the owner and group but no permissions to others.
setgid (2) on a directory makes every newly created file or subdirectory inherit the directory's group, satisfying the group-inheritance requirement.
The sticky bit (1) restricts deletion and renaming so that only the file's owner, the directory owner, or root can remove or rename a file, meeting the protection requirement.
With permissions 770, users outside the group have no access.
Therefore chmod 3770 /srv/projects provides all three behaviors.
The other options each miss at least one requirement:
2770 lacks the sticky bit, so any group member could delete others' files.
1770 lacks setgid, so new files would not inherit the devteam group.
770 applies no special bits at all, so neither inheritance nor restricted deletion would occur.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is the purpose of the setgid bit on a directory?
Open an interactive chat with Bash
What does the sticky bit do on a directory?
Open an interactive chat with Bash
Why is mode 770 applied in combination with the special bits?
Open an interactive chat with Bash
CompTIA Linux+ XK0-006 (V8)
Security
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
IT & Cybersecurity Package Join Premium for Full Access