diff --git a/scripts/install b/scripts/install index 19f41c5..a7c29c3 100755 --- a/scripts/install +++ b/scripts/install @@ -64,6 +64,7 @@ ynh_script_progression --message="Configuring SSH public key for remote connexio home=/home/$ssh_user mkdir -p /home/$ssh_user/.ssh chmod o=--- /home/$ssh_user +chown -R $ssh_user:$ssh_user /home/$ssh_user touch /home/$ssh_user/.ssh/authorized_keys extra="--storage-quota $quota" if [ "$quota" = "" ]; then diff --git a/scripts/restore b/scripts/restore index 50fd626..410547b 100755 --- a/scripts/restore +++ b/scripts/restore @@ -47,6 +47,8 @@ ynh_system_user_create --username=$ssh_user --home_dir=/home/$ssh_user --use_she home=/home/$ssh_user mkdir -p /home/$ssh_user/.ssh +chmod o=--- /home/$ssh_user +chown -R $ssh_user:$ssh_user /home/$ssh_user touch /home/$ssh_user/.ssh/authorized_keys extra="--storage-quota $quota" if [ "$quota" = "" ]; then diff --git a/scripts/upgrade b/scripts/upgrade index 009582a..9454993 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -100,6 +100,15 @@ ynh_script_progression --message="Upgrading borgbackup..." --weight=1 install_borg_with_pip +#================================================= +# AUTORIZE SSH FOR THIS USER +#================================================= +ynh_script_progression --message="Seting good permissions..." + +mkdir -p /home/$ssh_user/.ssh +chmod o=--- /home/$ssh_user +chown -R $ssh_user:$ssh_user /home/$ssh_user + #================================================= # AVOID BACKUP OF BACKUP #=================================================