A root-owned executable has set-user-ID set and is launched by a regular user.
What is the typical effective-user behavior?
A valid SUID executable can run with the effective user ID of its file owner, potentially root; this creates a privilege boundary that must be controlled.
Detailed explanation
Incorrect. SUID changes the effective identity rather than guaranteeing the caller's identity remains effective.
Incorrect. SUID changes the effective identity rather than guaranteeing the caller's identity remains effective.
Correct. The process may run with effective UID root, the file owner.
Correct. The process may run with effective UID root, the file owner.
Incorrect. SUID affects user ID, not only the primary group.
Incorrect. SUID affects user ID, not only the primary group.
Incorrect. The setting affects the process's effective identity.
Incorrect. The setting affects the process's effective identity.
Try it yourself
An example you can run in a temporary verification environment.
tmp=$(mktemp); chmod 4755 "$tmp"; stat -c '%A %a' "$tmp"; rm -f "$tmp"Expected result
所有者実行位置にsを含む表示と4755。ファイル自体は実行しないKey points
- SUID
- Effective UID
- Privilege escalation surface
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.