mirror of
https://github.com/D-Modem/bbs.git
synced 2026-11-29 01:38:10 -08:00
[general] user (and group): started as root, bbs serve reads the configuration, binds every socket it listens on (the listeners, TCP and unix; the HTTP API and metrics, FTP, NNTP, IRC, finger, gopher, binkp), gives up root (setgroups to the user's groups, setgid, setuid) and executes itself again, the same process (its PID, for systemd and reload), the sockets handed down; each server's listen takes the one for its address (internal/sockets). Nothing is written as root: database, logs, host keys, backups and a unix socket without socket_group are the user's. Other commands as root give root up first, so the database stays the user's (but check and config; backup restore puts things back as root and gives them, but the configuration, to the user). System configuration has Run as user and group. TestRunAs (as root) serves a port under 1024 and a unix socket as nobody, the same process through a reload. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AFQhReUqUc7F5srk2hViqr