ncopa/su-exec
switch user and group id and exec observed · 2026-08-28
Health v2 · maintenance only
47/100
- Activity 45
- Release rhythm 19
- Longevity 100
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-02. Adoption (stars, forks) is never an input.
- gap_med: n/a
- age_days: 3921
- days_rel: 330
- days_push: 330
- n_releases_24m: 1
Adoption not part of the score
1023 stars · 103 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-30, confidence not recorded
su-exec is a tiny C utility that switches user and group id and directly execs a program, avoiding the TTY and signal issues of su/sudo child processes. It is a lightweight 10kb alternative to gosu, commonly used in Docker entrypoints to drop root privileges.
Use cases
- drop root privileges when starting a process in a docker container
- run a command as another user without a child shell process
- replace gosu with a smaller binary in container images
- exec a service as a specific uid:gid in an entrypoint script
- avoid TTY and signal forwarding problems when switching users
When to choose
- you need a minimal, dependency-free setuid helper for Alpine or other Linux containers
- signal handling and PID 1 behavior matter in your container entrypoint
When to avoid
- you need full sudo/su features like authentication, logging, or command policies
- you are on a non-Linux platform or cannot run as root
Facets
cli-tool · maturity stable
security cli developer-tools cli setuid docker-entrypoint gosu-alternative privilege-drop c containers command-line linux docker
1 source
- readme: https://github.com/ncopa/su-exec · fetched 2026-08-28 · bcee08a16cca
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| ncopa/su-exec | main | 47 |
For agents
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem