Give ubuntu user access to cert files

This commit is contained in:
Chigozirim Igweamaka 2024-06-10 04:20:21 +01:00
parent 336377d606
commit 7024aba3c7

View file

@ -21,8 +21,8 @@ if [ ! -f "$CERT_DIR" ]; then
sudo apt install -y certbot sudo apt install -y certbot
sudo certbot certonly --standalone -d $DOMAIN --email $EMAIL --agree-tos --non-interactive sudo certbot certonly --standalone -d $DOMAIN --email $EMAIL --agree-tos --non-interactive
if [ $? -eq 0 ]; then if [ $? -eq 0 ]; then
sudo chmod 755 "$CERT_DIR/privkey.pem" sudo apt-get -y install acl
sudo chmod 755 "$CERT_DIR/fullchain.pem" sudo setfacl -m u:ubuntu:--x /etc/letsencrypt/archive
fi fi
fi fi