zed-industries/zed · error · anyhow::Error
the only available `bwrap` is setuid-root, which Zed refuses
Error message
the only available `bwrap` is setuid-root, which Zed refuses to run
What it means
Raised in wrap_invocation when the only bwrap binary discovered on PATH is the setuid-root variant, which Zed refuses to execute (it would grant the sandbox root privileges). A distinct message from the not-found case so users know to install a normal bubblewrap package.
Source
Thrown at crates/sandbox/src/linux_bubblewrap.rs:633
// inodes were pinned at policy-construction time, so a missing path here
// means the location vanished since capture. Never create it with the
// agent's ambient permissions — recreating from path text would bind a
// fresh, unapproved object in place of the pinned one (and historically
// this materialized bogus paths, e.g. a granted *file* path springing into
// existence as a directory). Running anyway would give the command silently
// less access than it believes it has — so fail closed with a clear error.
if !permissions.allow_fs_write {
for directory in writable_dirs {
if !directory.exists() {
bail!(
"failed to provide writable sandbox path {}: it no longer exists",
directory.display()
);
}
}
}
let bwrap = resolve_bwrap().map_err(|status| anyhow!(status.describe()))?;
let proxy_socket_sandbox_path = match permissions.network {
NetworkAccess::LocalhostPort(_) => Some(unique_proxy_socket_sandbox_path()),
NetworkAccess::None | NetworkAccess::All => None,
};
let mut bwrap_args = build_bwrap_args_with_sandbox_paths(
writable_dirs,
protected_paths,
permissions,
cwd,
proxy_socket_path,
proxy_socket_sandbox_path.as_deref(),
validation_socket.map(|socket| socket.host_socket_path),
validation_socket.map(|socket| socket.sandbox_socket_path),
);
bwrap_args.push("--".to_string());
let bridge = match permissions.network {
NetworkAccess::LocalhostPort(port) => {View on GitHub (pinned to 5a9b9558db)
Solutions
- Install a non-setuid bubblewrap and ensure unprivileged user namespaces work
- Check sysctl kernel.unprivileged_userns_clone
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at crates/sandbox/src/linux_bubblewrap.rs:633 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of zed-industries/zed@5a9b9558db (2026-08-20).
Data as JSON: /api/errors/cb1a826beb165cb7.
Report an issue: GitHub.