From aa754ce11f5e7db3807db90f7b4656d5e2082401 Mon Sep 17 00:00:00 2001 From: Sam & Claude Date: Sun, 21 Jun 2026 17:43:33 +0200 Subject: [PATCH] fix(bootstrap): chown jail /home/clawdie so daemon can write staging files #136 moved staging from /var/run/colibri-stage to /home/clawdie/.cache/colibri/stage. Bastille creates the jail's /home/clawdie as root:wheel, so the daemon (running as clawdie) couldn't create staging directories there. chown after binary copy ensures the daemon owns its home directory inside the jail. --- packaging/freebsd/agent-jail-bootstrap.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packaging/freebsd/agent-jail-bootstrap.sh b/packaging/freebsd/agent-jail-bootstrap.sh index a87e3a1..f8f4fe8 100755 --- a/packaging/freebsd/agent-jail-bootstrap.sh +++ b/packaging/freebsd/agent-jail-bootstrap.sh @@ -67,6 +67,10 @@ for bin in colibri colibri-daemon colibri-probe colibri-mcp colibri-test-agent c chmod 755 "${JAIL_ROOT}/usr/local/bin/${bin}" done +# Ensure the daemon can write staging files under the jail's home directory +# (bastille creates /home/clawdie as root:wheel; the daemon runs as clawdie). +chown -R clawdie:clawdie "${JAIL_ROOT}/home/clawdie" + # Copy npm global agents from the host (jails have no internet). NPM_PREFIX="/home/clawdie/.npm-global" mkdir -p "${JAIL_ROOT}${NPM_PREFIX}/bin" "${JAIL_ROOT}${NPM_PREFIX}/lib/node_modules"