fix: human-readable advisories for TLS data_dir + port-53 EACCES #48
Reference in New Issue
Block a user
Delete Branch "fix/tls-permission-advisory"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
tls::try_data_dir_advisory(&err, &dir) -> Option<String>— when TLS CA setup fails withPermissionDenied(typical first-run-without-sudo on macOS/Linux), print a multi-line diagnostic naming the data dir and offering two fixes (sudo numa installor set[server] data_dir). HTTPS proxy stays disabled gracefully; DNS resolution and plain-HTTP proxy keep working.PermissionDenied(EACCES). Previously onlyAddrInUsetriggered the advisory, so a fresh non-root user trying to bind a privileged port saw a raw OS error. Replacesport53_conflict_advisory+ publicis_port_53with a singlesystem_dns::try_port53_advisory(bind_addr, &err) -> Option<String>that handles both error kinds via a cause-sentence variant — no duplicated fix text.main.rsreduce to a symmetricif let Some(advisory) = ... { eprint!(...) }pattern; TLS error classification (thedowncast_ref::<io::Error>) lives insidetls.rsinstead of leaking into the binary entrypoint.main).Follow-up to #47.
Test plan
make allpasses locally (clippy clean, fmt clean, 142 unit tests pass)./target/release/numaprints both advisories sequentially (TLS first, then port 53), no rawOs { code: ... }errorstests/docker/smoke-port53.shstill passes (advisory text changed slightly: assertions forcannot bind to,numa install,bind_addrall still match)🤖 Generated with Claude Code