{"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":"error_code","errorClass":"eyre::Report","httpStatus":null,"severity":"error","filePath":"src/system/managed_files.rs","lineNumber":927,"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":909,"sourceCodeEnd":945,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/src/system/managed_files.rs#L909-L945","documentation":"The bootstrap accounts config declares the owner user referenced by a managed file/directory with state = \"absent\". Since the file must be owned by that user (state present), owning it via an account the same bootstrap run deletes is contradictory, so validation fails up front. This prevents mid-run ownership resolution failures.","triggerScenarios":"`validate_principals` runs during bootstrap planning; a [bootstrap.files]/[bootstrap.directories] entry has `owner = \"x\"` with state present, while [bootstrap.users] (or accounts config) declares user x with state = \"absent\".","commonSituations":"Copy-pasted account blocks where the user was later marked absent but file entries still reference them; pruning old users without updating file ownership declarations.","solutions":["Remove the `owner = \"x\"` key from the file/directory entries that reference the absent user.","Change the user's state back to present if the files genuinely need that owner.","Reassign ownership to a user that exists or is declared present (e.g. \"root\")."],"exampleFix":"# before\n[bootstrap.users.oldsvc]\nstate = \"absent\"\n\n[bootstrap.files.appconf]\npath = \"/etc/myapp/app.conf\"\nowner = \"oldsvc\"\n\n# after\n[bootstrap.users.oldsvc]\nstate = \"absent\"\n\n[bootstrap.files.appconf]\npath = \"/etc/myapp/app.conf\"\nowner = \"root\"\n","handlingStrategy":"validation","validationCode":"// lint your TOML: no file entry may reference an owner whose user state is \"absent\"\nfn owner_not_absent(files: &[Entry], users: &HashMap<String, UserState>) -> Result<()> {\n    for f in files {\n        if let Some(o) = &f.owner {\n            if users.get(o) == Some(&UserState::Absent) {\n                bail!(\"file {} references absent owner {}\", f.path, o);\n            }\n        }\n    }\n    Ok(())\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["When marking a user absent, grep the config for remaining owner references.","Keep owner/group assignments on one well-known account (e.g. root) unless required.","Run bootstrap planning (dry-run) before applying to catch validation errors early."],"tags":["config","accounts","ownership","validation"],"backgroundTag":"conflicting-config-options","analyzedSha":"533346cc374382b41ec5ff70536252b2e96e725c","analyzedAt":"2026-09-17T13:35:38.149Z","contentChangedAt":"2026-09-17T13:35:38.149Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}