From 183e04cde20cc38d360afd19fc6621b04a125a62 Mon Sep 17 00:00:00 2001 From: Alejandro Lembke Barrientos Date: Wed, 24 Apr 2024 22:17:32 +0000 Subject: [PATCH] Update permissions for SSH files and increment version number to 3.1.2 --- entrypoint.sh | 13 ++++++++++++- version.txt | 2 +- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/entrypoint.sh b/entrypoint.sh index a181c01..65b3c2e 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -78,7 +78,18 @@ if [ "$HOME_USER" != "$(whoami)" ]; then else sudo chown -R ${HOME_USER} /home/${HOME_USER} if [ -d "/home/${HOME_USER}/.ssh" ]; then - sudo chmod -R 600 /home/${HOME_USER}/.ssh + sudo chmod 755 /home/${HOME_USER}/.ssh + sudo chmod -R 600 /home/${HOME_USER}/.ssh/* + # Check if any .pub files exist in the .ssh directory + for file in /home/${HOME_USER}/.ssh/*.pub; do + if [ -f "$file" ]; then + sudo chmod 644 "$file" + fi + done + # Check if the known_hosts file exists in the .ssh directory + if [ -f "/home/${HOME_USER}/.ssh/known_hosts" ]; then + sudo chmod 644 /home/${HOME_USER}/.ssh/known_hosts + fi fi fi diff --git a/version.txt b/version.txt index 50e47c8..6ebad14 100755 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -3.1.1 \ No newline at end of file +3.1.2 \ No newline at end of file