become-user-for-unprivileged-ops

Status: IN

FTL2 supports `become_user` parameter on module calls to run operations as a specific unprivileged user rather than root — e.g., `become_user=SERVICE_USER` for `uv` installs.

Source: entries/2026/05/11/deployments-expert-service-deploy.md

Example

# From ftl2-agentcraft/scripts/sandbox.py — install tools as agent user
await ftl.agent_vm.shell(
    cmd="which uv || curl -LsSf https://astral.sh/uv/install.sh | sh",
    become_user=user,
)
await ftl.agent_vm.shell(
    cmd="export PATH=$HOME/.local/bin:$PATH && "
        "uv tool install git+https://github.com/benthomasson/ftl-reasons",
    become_user=user,
)

JSON