jdx/mise · critical

on ' ' changed after it was installed; another writer owns…

Error message

{target} on '{}' changed after it was installed; another writer owns that path

What it means

After installing the mise binary at a target path on the remote host, mise computes the remote file's SHA-256 and compares it to the expected digest. This error means the executable at `target` on the given host changed between install and verification, indicating another process or account is writing to that install path. mise bails rather than running a binary it did not write.

Solutions

  1. Pick a target path writable only by the SSH account (e.g. ~/.local/bin/mise) instead of a shared system path
  2. Stop or reconfigure the other writer (system mise package, config-management tool) on that path
  3. Re-run provisioning when no concurrent installs are running
  4. If the warning variant (no digest returned) appears instead, ensure sha256sum exists on the host

Example fix

# before: shared path other tools also write
target = "/usr/local/bin/mise"
# after: user-owned path
target = "~/.local/bin/mise"
Defensive patterns

Strategy: try-catch

Validate before calling

# preflight: confirm no other manager owns the target path
dpkg -S "$(readlink -f "$TARGET")" 2>/dev/null && echo "owned by a package; choose another path"
stat -c '%U %a' "$TARGET" 2>/dev/null

Try / catch

match provision_mise(&session, staging, &project, false, &mut resolver).await {
    Ok(target) => target,
    Err(e) if e.to_string().contains("changed after it was installed") => {
        warn!("shared install path is being written by another process");
        // fall back to a user-owned target and retry once
        provision_mise(&session, staging, &project, true, &mut resolver).await?
    }
    Err(e) => return Err(e),
}

Prevention

When it happens

Trigger: provision_mise installs mise at `target` via `sh -c install_mise_script(target)`, then remote_executable_sha256 returns a digest that differs from the expected one; raised from the install verification step on the remote host.

Common situations: The install path (e.g. /usr/local/bin/mise or a shared ~/.local/bin) is also managed by a package manager, ansible run, or another user's cron; a system-wide mise package auto-replaced the binary; concurrent mise provisioning jobs raced on the same host.

Understand the failure class

Background: Checksum mismatch errors: "checksum verification failed", "digest mismatch", "expected vs actual checksum" — what they mean and how to fix them — this error's family across 41 libraries.

Related errors


AI-assisted analysis of jdx/mise@533346cc37 (2026-09-17). Data as JSON: /api/errors/2d7924009c9fb9ee. Report an issue: GitHub.

Appendix: source

Thrown at src/system/remote.rs:1082

    if remote_executable_sha256(session, target)
        .await?
        .is_some_and(|installed| installed == expected)
    {
        info!(
            "mise is already installed at {target} on {}",
            session.host.name
        );
        return Ok(());
    }
    let file = File::open(binary)
        .wrap_err_with(|| format!("failed to open mise binary {}", binary.display()))?;
    session
        .status_with_stdin_async(&["sh", "-c", &install_mise_script(target)], file)
        .await?;
    // An install path can be writable by more than the SSH account, so confirm
    // the executable about to run is the one that was just written.
    match remote_executable_sha256(session, target).await? {
        Some(installed) if installed != expected => bail!(
            "{target} on '{}' changed after it was installed; another writer owns that path",
            session.host.name
        ),
        Some(_) => {}
        None => warn!(
            "cannot verify the mise installed at {target} on {}; the host returned no SHA-256 digest",
            session.host.name
        ),
    }
    info!("installed mise to {target} on {}", session.host.name);
    Ok(())
}

/// Writes beside the target and renames, so a replaced executable is never
/// truncated in place and a busy binary cannot fail with ETXTBSY. The write
/// goes into a `mktemp -d` directory rather than a named sibling file: that
/// directory is private to the SSH account, so nobody else can swap the path
/// out from under `cat` in a shared writable install directory. A directory at

View on GitHub (pinned to 533346cc37)