{"record":{"id":"a07b0d9ecc86f729","repo":"jdx/mise","slug":"service-unit-name-has-invalid-umask-value","errorCode":null,"errorMessage":"service unit '{name}' has invalid `umask` value '{umask}'; expected an octal access mask from 0000 through 0777","messagePattern":"service unit '(.+?)' has invalid `umask` value '(.+?)'; expected an octal access mask from 0000 through 0777","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/system/systemd.rs","lineNumber":226,"sourceCode":"                && config.on_unit_active_sec.is_none()\n                && config.on_unit_inactive_sec.is_none()\n                && config.on_calendar.is_none()\n            {\n                bail!(\n                    \"timer unit '{name}' must set at least one of `on_boot_sec`, \\\n                     `on_unit_active_sec`, `on_unit_inactive_sec`, or `on_calendar`\"\n                );\n            }\n        }\n        if let Some(nice) = config.nice\n            && !(-20..=19).contains(&nice)\n        {\n            bail!(\"service unit '{name}' has invalid `nice` value {nice}; expected -20 through 19\");\n        }\n        if let Some(umask) = &config.umask\n            && !valid_umask(umask)\n        {\n            bail!(\n                \"service unit '{name}' has invalid `umask` value '{umask}'; expected an octal access mask from 0000 through 0777\"\n            );\n        }\n        let wanted_by = config.wanted_by.unwrap_or_else(|| match kind {\n            SystemdUnitKind::Service => vec![\"default.target\".to_string()],\n            SystemdUnitKind::Timer => vec![\"timers.target\".to_string()],\n        });\n        Ok(Self {\n            unit: format!(\n                \"dev.mise.{name}.{}\",\n                match kind {\n                    SystemdUnitKind::Service => \"service\",\n                    SystemdUnitKind::Timer => \"timer\",\n                }\n            ),\n            name,\n            kind,\n            description: config.description,","sourceCodeStart":208,"sourceCodeEnd":244,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/src/system/systemd.rs#L208-L244","documentation":"systemd unit generation validated the service's umask value and found it outside 0000–0777 (non-octal, negative, or > 0777). Because systemd would reject or misinterpret it, from_toml fails fast naming the unit and the bad value.","triggerScenarios":"Thrown at src/system/systemd.rs:226 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use an octal mask in range, e.g. `umask = \"0022\"`","Remove the umask key to keep systemd's default","Check for a typo like a leading 0x or decimal value"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"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"}