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 does the g+s flag do in more detail?
Open an interactive chat with Bash
What is the difference between g+s and u+s?
Open an interactive chat with Bash
Why doesn't changing numeric permissions achieve group inheritance?