From b4f35e17fad9b38aef3b4fab68b699b327b5e283 Mon Sep 17 00:00:00 2001 From: flavienbwk Date: Wed, 7 Jun 2023 14:35:31 +0200 Subject: [PATCH] #9: Added right chmod/chown for certificates --- generate-certs-hot-warm.sh | 3 +++ generate-certs.sh | 3 +++ 2 files changed, 6 insertions(+) diff --git a/generate-certs-hot-warm.sh b/generate-certs-hot-warm.sh index 78dcafd..490efaa 100644 --- a/generate-certs-hot-warm.sh +++ b/generate-certs-hot-warm.sh @@ -32,3 +32,6 @@ do openssl x509 -req -extfile <(printf "subjectAltName=DNS:localhost,IP:127.0.0.1,DNS:$NODE_NAME") -in "certs/$NODE_NAME/$NODE_NAME.csr" -CA certs/ca/ca.pem -CAkey certs/ca/ca.key -CAcreateserial -sha256 -out "certs/$NODE_NAME/$NODE_NAME.pem" rm "certs/$NODE_NAME/$NODE_NAME-temp.key" "certs/$NODE_NAME/$NODE_NAME.csr" done + +chmod -R 750 ./certs +chown -R $USER:1000 ./certs diff --git a/generate-certs.sh b/generate-certs.sh index 04eb5d7..8b7548b 100644 --- a/generate-certs.sh +++ b/generate-certs.sh @@ -32,3 +32,6 @@ do openssl x509 -req -extfile <(printf "subjectAltName=DNS:localhost,IP:127.0.0.1,DNS:$NODE_NAME") -in "certs/$NODE_NAME/$NODE_NAME.csr" -CA certs/ca/ca.pem -CAkey certs/ca/ca.key -CAcreateserial -sha256 -out "certs/$NODE_NAME/$NODE_NAME.pem" rm "certs/$NODE_NAME/$NODE_NAME-temp.key" "certs/$NODE_NAME/$NODE_NAME.csr" done + +chmod -R 750 ./certs +chown -R $USER:1000 ./certs