rustdesk/rustdesk · error

Changing permanent password was rejected by daemon

Error message

Changing permanent password was rejected by daemon

What it means

set_permanent_password forwards the change to the daemon via set_permanent_password_with_ack and expects an affirmative acknowledgement. If the daemon processes the request but does not confirm success (the ack returns false), the client bails with 'Changing permanent password was rejected by daemon'. The daemon itself may have refused because its own policy check failed or its local set operation errored.

Source

Thrown at src/ipc.rs:1705

        return v == "Y";
    }
    false
}

pub fn get_fingerprint() -> String {
    get_config("fingerprint")
        .unwrap_or_default()
        .unwrap_or_default()
}

pub fn set_permanent_password(v: String) -> ResultType<()> {
    if Config::is_disable_change_permanent_password() {
        bail!("Changing permanent password is disabled");
    }
    if set_permanent_password_with_ack(v)? {
        Ok(())
    } else {
        bail!("Changing permanent password was rejected by daemon");
    }
}

#[tokio::main(flavor = "current_thread")]
pub async fn set_permanent_password_with_ack(v: String) -> ResultType<bool> {
    set_permanent_password_with_ack_async(v).await
}

async fn set_permanent_password_with_ack_async(v: String) -> ResultType<bool> {
    // The daemon ACK/NACK is expected quickly since it applies the config in-process.
    let ms_timeout = 1_000;
    let mut c = connect(ms_timeout, "").await?;
    c.send_config("permanent-password", v).await?;
    if let Some(Data::Config((name2, Some(v)))) = c.next_timeout(ms_timeout).await? {
        if name2 == "permanent-password" {
            let v = v.trim();
            let ok = v == "Y";
            if ok {

View on GitHub (pinned to 91c9fccbb0)

Solutions

  1. Restart the RustDesk daemon/service so it picks up current config, then retry the password change.
  2. Ensure client and daemon are the same version (upgrade both) so the ack protocol matches.
  3. Check daemon-side settings: the same disable-change-permanent-password policy must be off there too.
  4. Verify the daemon can write its config directory (permissions/disk space) so the new password can be persisted.
Defensive patterns

Strategy: retry

Try / catch

match set_permanent_password(pwd) {
    Err(e) if e.to_string().contains("rejected by daemon") => {
        // restart/verify daemon, then retry once
        restart_daemon();
        set_permanent_password(pwd)?;
    }
    other => other?,
}

Prevention

When it happens

Trigger: Calling set_permanent_password when the daemon receives the request but its response/ack indicates the change was not applied — daemon-side disable flag still active, daemon failed to persist the new password, IPC reply missing the expected success flag, or the daemon is an older/incompatible version.

Common situations: Client and daemon version mismatch where the ack semantics differ; daemon running with the password-change policy disabled while the client check passed; daemon config directory not writable so persistence failed; transient IPC desynchronization.

Related errors


AI-assisted analysis of rustdesk/rustdesk@91c9fccbb0 (2026-09-10). Data as JSON: /api/errors/61d2417fddf3455a. Report an issue: GitHub.