A shared project directory called /srv/teamdata currently has the permissions drwxrwsr-x (octal 2775), ensuring that any new files inherit the group ownership of team. Management now requires that team members must not be able to delete or rename files they do not own, while still allowing every member to create new files, edit their own work, and keep the existing group-inherit behavior. Which single command best meets this requirement without changing the directory's existing read, write, or execute bits?
The ability to inherit group ownership already comes from the setgid bit (octal 2 in the special-permission digit). Preventing users from deleting or renaming one another's files in a writable directory is accomplished by adding the sticky bit (octal 1 in the special-permission digit). Combining setgid (2) and sticky (1) in the left-most octal digit yields 3, so applying chmod 3775 /srv/teamdata keeps the existing rwx bits while enabling both special permissions.
chmod 1777 would add the sticky bit but remove the setgid bit and make the directory world-writable, violating requirements. chmod g-s removes the setgid bit entirely, breaking group inheritance. chmod 775 removes both special bits, leaving files deletable by any group member. Therefore chmod 3775 /srv/teamdata is the only command that satisfies all stated conditions.
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 sticky bit in Linux?
Open an interactive chat with Bash
What does the setgid (set group ID) bit do?
Open an interactive chat with Bash
Why is `chmod 3775` the correct choice for this scenario?
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