magus v0.4.3 is out. See what's new
¶ View markdown source · ✎ Suggest an edit
1 min read

MGS9002: insecure token file permissions

A magus credential file, the operator token or a record in the token store (tokens.d), has filesystem permissions looser than 0600, so a user other than its owner could read it. Magus refuses to load it rather than trust a world- or group-readable credential. magus doctor also names a state directory other accounts can read.

[MGS9002] auth: token file /path has insecure permissions 0644 (want 0600);
fix with: chmod 600 /path
  see: .../MGS9002.md

Why

These files hold bearer secrets. A secret readable by other accounts on the machine is effectively shared. Magus treats loose permissions as a hard error (not a warning) so a leaked-by-default credential cannot be used silently.

Resolution

Tighten the file to owner-only read/write, exactly as the message says:

chmod 600 <path>

Then re-run the command. If the file lives on a filesystem that cannot represent Unix permissions, move the magus state directory to one that can.

See also

MGS9002authtokenconnectorpermissionssecurity
Last updated (f0d4ffc9)
Earlier changes on this page (1)

Full history ↗ · Blame source ↗

Glossary

Op

A single tool-native command a target composes (long form: operation); the middle of the work hierarchy (Spell to Op to Target). See operations.

Run

One target executing under one magus invocation, such as magus run test web or magus affected ci. A run keeps its captured output behind an output reference. Every magus run is a run whether or not any job asked for it; see Job for how the two relate.

Conventions

This page uses none of the site's convention markers. The full set is on the conventions page.