{"record":{"id":"832717913f6810e4","repo":"jdx/mise","slug":"managed-system-files-require-owner-owner-but","errorCode":null,"errorMessage":"managed system files require owner '{owner}', but that bootstrap user is absent","messagePattern":"managed system files require owner '(.+?)', but that bootstrap user is absent","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/system/managed_files.rs","lineNumber":859,"sourceCode":"    accounts: Option<&super::accounts::AccountRequests>,\n    allow_pending_accounts: bool,\n) -> Result<()> {\n    for (owner, group) in files\n        .iter()\n        .filter(|request| request.state == ManagedState::Present)\n        .map(|request| (request.owner.as_deref(), request.group.as_deref()))\n        .chain(\n            directories\n                .iter()\n                .filter(|request| request.state == ManagedState::Present)\n                .map(|request| (request.owner.as_deref(), request.group.as_deref())),\n        )\n    {\n        if let Some(owner) = owner {\n            match accounts\n                .and_then(|accounts| accounts.users.iter().find(|request| request.name == owner))\n            {\n                Some(request) if request.state == super::accounts::AccountState::Absent => bail!(\n                    \"managed system files require owner '{owner}', but that bootstrap user is absent\"\n                ),\n                Some(request)\n                    if allow_pending_accounts\n                        && request.plan().action == ResourceAction::Unknown =>\n                {\n                    bail!(\n                        \"managed system files require owner '{owner}', but that bootstrap user cannot be safely converged\"\n                    )\n                }\n                Some(_) if allow_pending_accounts => {}\n                Some(_) | None => {\n                    resolve_user(owner)?;\n                }\n            }\n        }\n        if let Some(group) = group {\n            match accounts","sourceCodeStart":841,"sourceCodeEnd":877,"githubUrl":"https://github.com/jdx/mise/blob/afd2eddd3a50c16190efc1c7e94404b48f72af57/src/system/managed_files.rs#L841-L877","documentation":"Raised during cross-resource validation when a managed file declares an `owner` that is also declared as a bootstrap user with state = \"absent\". Setting ownership requires the user to exist, but the bootstrap plan explicitly removes that user — the plan is contradictory, so convergence is refused.","triggerScenarios":"Converging bootstrap where a [bootstrap.files] entry has owner = \"<name>\" and a bootstrap account entry for the same name has state = \"absent\"; validation searches accounts.users for the owner and matches the Absent arm.","commonSituations":"A user was renamed in the config (old user set absent, new files entry still referencing the old name); a cleanup config removes an account but leftover file entries still reference it; copy-paste between host configs where one host retires the account.","solutions":["Remove the account-absent declaration so the owner user is not being deleted.","Or change the file entry's `owner` to a user that exists or is declared state = \"present\".","Or drop the `owner` from the file entry if default ownership is acceptable.","If the account is being retired, also retire or re-own its file entries in the same config change."],"exampleFix":"# before\n[[bootstrap.files]]\npath = \"/etc/app.conf\"\nowner = \"svc-app\"\nstate = \"present\"\n[[bootstrap.users]]\nname = \"svc-app\"\nstate = \"absent\"\n\n# after\n[[bootstrap.files]]\npath = \"/etc/app.conf\"\nowner = \"svc-app\"\nstate = \"present\"\n[[bootstrap.users]]\nname = \"svc-app\"\nstate = \"present\"","handlingStrategy":"validation","validationCode":"fn validate_owner_accounts(files: &[ManagedFileRequest], users: &[UserRequest]) -> Result<(), String> {\n    for f in files {\n        if let Some(owner) = &f.owner {\n            if users.iter().any(|u| &u.name == owner && u.state == AccountState::Absent) {\n                return Err(format!(\"owner '{}' is declared absent by bootstrap\", owner));\n            }\n        }\n    }\n    Ok(())\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Cross-check every file `owner` against account entries in the same config.","When retiring a user, update or remove all file entries referencing it in the same change.","Keep an automated config check that no absent account is referenced as an owner/group."],"tags":["bootstrap","users","ownership","plan-conflict"],"backgroundTag":"invalid-state-transition","analyzedSha":"afd2eddd3a50c16190efc1c7e94404b48f72af57","analyzedAt":"2026-09-09T01:38:25.179Z","contentChangedAt":"2026-09-09T01:38:25.179Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}