Linux capabilities for a single binary: setcap cap_net_bind_service= /usr/local/bin/myapp without running as root
The “I want my Go binary to bind port 80 without running as root” problem has three solutions of varying terribleness:
- Run the whole thing as root. The traditional answer. Catastrophic if the binary has a single bug — game