{"record":{"id":"dbf45776ff1375d7","repo":"jdx/mise","slug":"bootstrap-user-name-field-must-be-an-absolut","errorCode":null,"errorMessage":"bootstrap user '{name}' {field} must be an absolute path","messagePattern":"bootstrap user '(.+?)' (.+?) must be an absolute path","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/system/accounts.rs","lineNumber":727,"sourceCode":"            .next()\n            .is_some_and(|character| character == '_' || character.is_ascii_alphabetic())\n        && characters.all(|character| {\n            character == '_'\n                || character == '-'\n                || character.is_ascii_digit()\n                || character.is_ascii_alphabetic()\n        });\n    if !valid {\n        bail!(\n            \"invalid bootstrap {kind} name '{name}': use at most 32 ASCII letters, digits, '_' or '-', with an optional trailing '$'\"\n        );\n    }\n    Ok(())\n}\n\nfn validate_account_path(name: &str, field: &str, path: &std::path::Path) -> Result<()> {\n    if !path.is_absolute() {\n        bail!(\"bootstrap user '{name}' {field} must be an absolute path\");\n    }\n    if path\n        .to_string_lossy()\n        .chars()\n        .any(|character| character == ':' || character == '\\n' || character == '\\r')\n    {\n        bail!(\"bootstrap user '{name}' {field} must not contain ':', CR, or LF\");\n    }\n    Ok(())\n}\n\npub fn plans(requests: &AccountRequests) -> Vec<ResourcePlan> {\n    requests\n        .groups\n        .iter()\n        .map(GroupRequest::plan)\n        .chain(requests.users.iter().map(UserRequest::plan))\n        .collect()","sourceCodeStart":709,"sourceCodeEnd":745,"githubUrl":"https://github.com/jdx/mise/blob/9dcfcaa0dc8747a2577d3270b69bb9d8313b2807/src/system/accounts.rs#L709-L745","documentation":"mise validates the `home` and `shell` fields of every `[bootstrap.users.<name>]` entry via `validate_account_path` before planning account changes. These values are handed verbatim to `useradd`/`usermod` and land in `/etc/passwd`, where both fields must be absolute paths, so a relative path is rejected at config-parse time. The failing project name and field are included in the message.","triggerScenarios":"A `[bootstrap.users.<name>]` table sets `home = \"app/data\"`, `shell = \"bin/bash\"`, `home = \"~/mise\"`, or any value whose `Path::is_absolute()` is false. `UserRequest::from_toml` calls `validate_account_path(&name, \"home\"|\"shell\", path)` and bails as soon as `mise bootstrap accounts apply`/`status` reads the config.","commonSituations":"Copying docker-compose-style relative path conventions into bootstrap config; using `~` or `./` prefixes that mise deliberately does not expand here; pointing the home directory inside the project repo without spelling out the full path.","solutions":["Change the value to a path rooted at `/`, e.g. `home = \"/home/mise\"` or `shell = \"/usr/bin/bash\"`.","If the home must live under a project, write the full absolute location such as `home = \"/srv/myapp/home\"`; `~` and relative paths are never expanded for account fields.","Re-run `mise bootstrap accounts status` to confirm the config now parses and shows the planned state."],"exampleFix":"# before\n[bootstrap.users.deploy]\ngroup = \"deploy\"\nhome = \"srv/deploy\"\nshell = \"bin/bash\"\n\n# after\n[bootstrap.users.deploy]\ngroup = \"deploy\"\nhome = \"/srv/deploy\"\nshell = \"/bin/bash\"","handlingStrategy":"validation","validationCode":"fn account_path_ok(p: &std::path::Path) -> bool {\n    p.is_absolute()\n        && !p.to_string_lossy().chars().any(|c| c == ':' || c.is_control())\n}\n\n// preflight over parsed config before calling accounts::apply\nfor (name, user) in &users {\n    for (field, path) in [(\"home\", &user.home), (\"shell\", &user.shell)] {\n        if let Some(p) = path {\n            assert!(account_path_ok(p), \"{name} {field} must be absolute, no ':' or control chars\");\n        }\n    }\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always write account home/shell paths starting with '/'; mise never expands '~' or project-relative paths for these fields.","Lint mise.toml in CI (e.g. `mise bootstrap accounts status --dry-run` on a Linux runner) so bad paths fail the build, not the host."],"tags":["mise","bootstrap","accounts","path-validation","linux","config"],"backgroundTag":"absolute-path-required","analyzedSha":"9dcfcaa0dc8747a2577d3270b69bb9d8313b2807","analyzedAt":"2026-08-17T14:28:50.624Z","schemaVersion":2},"datasetVersion":"2026-08-21T13:17:26.733Z"}