From 04819a897c2ca52a1988875c8864b3400accab88 Mon Sep 17 00:00:00 2001 From: nold Date: Fri, 20 Aug 2021 14:40:09 +0200 Subject: [PATCH] Fix: authorized_keys permissions --- data/run.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/data/run.sh b/data/run.sh index e794704..ba38093 100755 --- a/data/run.sh +++ b/data/run.sh @@ -77,6 +77,7 @@ for keyfile in $(find "${SSH_KEY_DIR}/clients" ! -regex '.*/\..*' -a -type f); d echo -n "command=\"$(eval echo -n \"${borg_cmd}\")\" " >> ${AUTHORIZED_KEYS_PATH} cat ${keyfile} >> ${AUTHORIZED_KEYS_PATH} done +chmod 0600 "${AUTHORIZED_KEYS_PATH}" echo " * Validating structure of generated ${AUTHORIZED_KEYS_PATH}..." ERROR=$(ssh-keygen -lf ${AUTHORIZED_KEYS_PATH} 2>&1 >/dev/null)