From 8dcf77335cecb629fc8d7e539138a76724b59811 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sun, 20 Jun 2021 14:36:38 +0200 Subject: [PATCH] Correct permissions of generated certificates --- entrypoint.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/entrypoint.sh b/entrypoint.sh index 1d48ad3..a67278b 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -14,3 +14,10 @@ fi certbot certonly --agree-tos --cert-name "${DOMAIN}" \ --email "$EMAIL" --expand --non-interactive \ --domain "$DOMAIN" --standalone $STAGING + +# Correct permissions for multi user container/pod deployments +# if not indicated otherwise +if [ -z "$LEAVE_PERMISSIONS_AS_IS" ]; then + find /etc/letsencrypt -type d -exec chmod 0755 {} \; + find /etc/letsencrypt -type f -exec chmod 0644 {} \; +fi