From bb723d867c380ef56917dc4c7836d33b940c6a69 Mon Sep 17 00:00:00 2001 From: Igor Soarez Date: Wed, 18 Nov 2026 17:27:24 +0000 Subject: szecret enrol: identity.pub 644 whatever the umask --- secrets/enrol.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/secrets/enrol.sh b/secrets/enrol.sh index 2f1d61e..8174d6f 100755 --- a/secrets/enrol.sh +++ b/secrets/enrol.sh @@ -69,6 +69,8 @@ esac [[ "${pub}" =~ ^age1[0-9a-z]+$ ]] || die "the new key's public half doesn't look like one: ${pub:-nothing}; no key made" chmod 600 "${tmp}" echo "${pub}" > "${identity_pub}.tmp" +# Whatever the umask (sg gives 002): the key it names must be the one here. +chmod 644 "${identity_pub}.tmp" mv "${identity_pub}.tmp" "${identity_pub}" mv "${tmp}" "${identity}" >&2 echo "szecret: enrolled; add this machine's public key to cloud-setup's szecret/hosts:" -- cgit v1.2.3