A shared directory /project is owned by the group project, but files created by users default to their individual primary groups. Which command adjusts /project so new files inherit the directory's group?
Applying the g+s flag activates the set group ID bit on the directory, causing new files and subdirectories to inherit its group ownership. Using u+s sets the set user ID bit, which affects user permissions, not group inheritance. Simply changing numeric permissions without the special bit does not enforce group inheritance. Altering ownership alone adjusts only the current owner and group, not the inheritance behavior.
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 Set Group ID (g+s) bit and how does it work?
Open an interactive chat with Bash
How does the set user ID (u+s) differ from the set group ID (g+s)?
Open an interactive chat with Bash
Why is simply changing numeric permissions (e.g., 775) insufficient for group inheritance?