Relationships
↔ sibling #4840#4896 @swamp/cfgmgmt apt_repository: gpgKeyUrl writes keyring with umask-dependent perms (640 on umask-027) -> apt signature verification fails
Opened by kneel · 11/19/2026· Shipped 11/20/2026
When an apt_repository is applied with gpgKeyUrl, the type fetches + dearmors the signing key and writes it to the signedBy path, but the file mode follows roots umask. On a host with umask 027 the keyring lands 640 (rw-r-----). Debian trixie apt verifier sqv runs as _apt -- neither owner nor group root -- so it cannot read it:
W: OpenPGP signature verification failed: ... InRelease: Failed to parse keyring "/etc/apt/keyrings/.asc": Permission denied (os error 13) E: The repository "..." is not signed.
The repo is rejected and apt-get update/installs fail. A umask-022 host gets 644 and works -- so it is silent and umask-dependent.
Expected: keyrings under /etc/apt/keyrings/ should be world-readable (0644) regardless of roots umask, since apt _apt/sqv must read them.
Repro: apply an apt_repository with gpgKeyUrl on a Debian trixie host whose root umask is 027; apt-get update fails signature verification; stat shows the keyring at 640.
Suggested fix: write the keyring 0644 explicitly (not umask-dependent), or expose a keyringMode option.
Workaround: manage the keyring as a separate file resource at 0644 and omit gpgKeyUrl (use signedBy only).
Upstream repository: https://github.com/swamp-club/swamp-extensions
Environment
- Extension:
@swamp/cfgmgmt@2026.11.17.1 - swamp:
20261114.210101.0-sha.537e03d1 - OS:
linux(x86_64) - Deno:
2.9.8 - Shell:
/bin/zsh
Shipped
Click a lifecycle step above to view its details.
system commented 11/19/2026, 3:28:54 PM
Classified automatically when this issue was filed.
- Source: Extensions
If you feel this classification is incorrect, add a ripple to tell us so.
Sign in to post a ripple.