A shared directory named /data/reports must allow users from different departments to create and modify files, but every new file or subdirectory must automatically belong to the group finance, regardless of the creator's primary group. You want to keep the directory's existing permissions intact while achieving this requirement with a single command. Which command meets the goal?
The setgid (set-group-ID) permission on a directory forces all newly created files and subdirectories to inherit the directory's group ownership. Using symbolic mode g+s with chmod enables this bit without altering any other permission bits, so every item created inside /data/reports will immediately belong to the finance group.
chmod +t sets the sticky bit, which only controls who may delete or rename files in a world-writable directory and does not affect group ownership.
chown :finance changes the current group owner of the directory but does not influence future creations inside it.
setfacl -m d:g:finance:rwx establishes a default ACL that grants rights to group finance; it does not change the group ID assigned to new objects. Therefore, only chmod g+s /data/reports satisfies the scenario.
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 does the setgid (set-group-ID) permission do on a directory?
Open an interactive chat with Bash
How is the sticky bit different from the setgid bit?
Open an interactive chat with Bash
When would using ACLs be more appropriate than using chmod g+s?
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...
Pass with Confidence.
IT & Cybersecurity Package
You have hit the limits of our free tier, become a Premium Member today for unlimited access.
Military, Healthcare worker, Gov. employee or Teacher? See if you qualify for a Community Discount.
Monthly
$19.99
$19.99/mo
Billed monthly, Cancel any time.
3 Month Pass
$44.99
$14.99/mo
One time purchase of $44.99, Does not auto-renew.
MOST POPULAR
Annual Pass
$119.99
$9.99/mo
One time purchase of $119.99, Does not auto-renew.
BEST DEAL
Lifetime Pass
$189.99
One time purchase, Good for life.
What You Get
All IT & Cybersecurity Package plans include the following perks and exams .