# tar_header_not_canonical

> A tar header or its padding differs from the canonical ustar encoding.

A tar header or its padding differs from the canonical ustar encoding.

| | |
| --- | --- |
| Kind | Build or validation problem |
| Reported by | Archive validation (registry, room hosts, disko publish) |
| `disko` exit code | 1 (problems) |

A tar header, or the padding after a file, differs from the one fixed
encoding disko accepts. Every field is set exactly (mode `0644`, owner `0`,
modification time `0`, regular files only, plain ustar with no pax or GNU
extensions), so the same files always produce the same bytes and the same
digest.

## Why it happens

Archive validation reports this code: the registry on upload, and room hosts
before loading. `disko publish` writes canonical headers. General-purpose
`tar` tools record real permissions, owners and timestamps, add directory
entries or extension headers, and so fail this check.

## Wrong

```sh
tar -czf release.tgz game.json src art
```

## Right

```sh
disko publish --dry-run --out release.tgz
```

## See also

- [Publish a release](/get-started/publish)
- [`tar_malformed`](/errors/tar_malformed)
