fix(spawner): stage jail spawn files under daemon-owned home, not /var/run #136
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "stage-under-daemon-home"
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?
Closes #135 — the structural cleanup follow-up to the jail-spawn EACCES fixes (#131, #134).
Problem. The daemon stages per-spawn
launch.sh/env.shunder the jail root, but the old location/var/run/colibri-stageis root-owned, so the daemon (running asclawdie) can't create per-spawn subdirs there. #134 worked around it by pre-creating the dir inagent-jail-bootstrap.sh, leaving the daemon dependent on an external provisioning step into a root-owned tree (and/var/runcan be tmpfs/cleared on boot).Change. Default staging root moves to the daemon user's home —
/home/clawdie/.cache/colibri/stage— whichclawdieowns by construction of the jail account.create_dir_allnow succeeds with no privileged pre-creation step, and/homeis persistent. Path is overridable viaCOLIBRI_JAIL_STAGE_DIR, matching the daemon's other env-configurable paths.spawner.rs:const STAGED_JAIL_RUN_DIR→staged_jail_run_dir()resolver; unit test updated.agent-jail-bootstrap.sh: drop the now-unnecessaryinstall -dstaging block +DAEMON_USERvar (the #134 workaround).Verified:
cargo clippy -p colibri-daemonclean; spawner suite green (21 tests, incl. the staged-spawn test against the new path);sh -nclean; touched docs pass the markdown gate.One thing for Hermes to confirm on osa: this assumes the jail's
/home/clawdieis owned byclawdie(true when the jail account is created withpw useradd -m). After pulling, re-run a jailedspawn-agentto confirm staging lands under~/.cache/colibri/stage— and the oldchmod 777//var/runworkaround can be dropped.🤖 Generated with Claude Code