The team directory is owned by group developers.
Make new files inherit developers instead of the creator's primary group.
Which special mode should be set?
Directory SGID causes new entries to inherit the parent directory's group, helping keep collaborative files aligned.
Detailed explanation
Incorrect. setuid changes effective user identity for executables.
Incorrect. setuid changes effective user identity for executables.
Incorrect. The sticky bit restricts deletion in shared directories.
Incorrect. The sticky bit restricts deletion in shared directories.
Correct. setgid on the directory provides group inheritance.
Correct. setgid on the directory provides group inheritance.
Incorrect. Combining unrelated bits is unnecessary for group inheritance.
Incorrect. Combining unrelated bits is unnecessary for group inheritance.
Try it yourself
An example you can run in a temporary verification environment.
tmp=$(mktemp -d); chmod g+s "$tmp"; stat -c '%A %a' "$tmp"; chmod 700 "$tmp"; rmdir "$tmp"Expected result
グループ実行位置にsを含む表示と、2で始まる4桁モードKey points
- Directory SGID
- Group inheritance
- Group write is separate
Notes
- Environment: GNU coreutils 9.x / 一時ディレクトリ
- Command output formatting can vary slightly by distribution or tool version.
- Run the example in a temporary directory or process when possible.
Foundation review
Read the scope first
Check whether the command acts on the current shell, a new process, an existing process, or a file.
Verify the observable result
Use the supplied command and compare the output with the expected result.