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.
Correct. The process may run with effective UID root, the file owner.
Incorrect. SUID affects user ID, not only the primary group.
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 / 空の一時ファイルを表示のみ
- Use a disposable file or directory when checking chmod calculations.
- Exact permission display can vary slightly with filesystem and distribution defaults.
Foundation review
Place the operation
A root-owned SUID program may perform selected operations with effective UID root; the bit does not change file ownership.
Check the side effect
Treat SUID executables as a security boundary and inspect their code and required privileges carefully.