jdx/mise · error

service unit ' ' has invalid `umask` value ' '; expected an…

Error message

service unit '{name}' has invalid `umask` value '{umask}'; expected an octal access mask from 0000 through 0777

What it means

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.

Solutions

  1. Use an octal mask in range, e.g. `umask = "0022"`
  2. Remove the umask key to keep systemd's default
  3. Check for a typo like a leading 0x or decimal value
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at src/system/systemd.rs:226 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of jdx/mise@533346cc37 (2026-09-17). Data as JSON: /api/errors/a07b0d9ecc86f729. Report an issue: GitHub.

Appendix: source

Thrown at src/system/systemd.rs:226

                && config.on_unit_active_sec.is_none()
                && config.on_unit_inactive_sec.is_none()
                && config.on_calendar.is_none()
            {
                bail!(
                    "timer unit '{name}' must set at least one of `on_boot_sec`, \
                     `on_unit_active_sec`, `on_unit_inactive_sec`, or `on_calendar`"
                );
            }
        }
        if let Some(nice) = config.nice
            && !(-20..=19).contains(&nice)
        {
            bail!("service unit '{name}' has invalid `nice` value {nice}; expected -20 through 19");
        }
        if let Some(umask) = &config.umask
            && !valid_umask(umask)
        {
            bail!(
                "service unit '{name}' has invalid `umask` value '{umask}'; expected an octal access mask from 0000 through 0777"
            );
        }
        let wanted_by = config.wanted_by.unwrap_or_else(|| match kind {
            SystemdUnitKind::Service => vec!["default.target".to_string()],
            SystemdUnitKind::Timer => vec!["timers.target".to_string()],
        });
        Ok(Self {
            unit: format!(
                "dev.mise.{name}.{}",
                match kind {
                    SystemdUnitKind::Service => "service",
                    SystemdUnitKind::Timer => "timer",
                }
            ),
            name,
            kind,
            description: config.description,

View on GitHub (pinned to 533346cc37)