diff --git a/manifest.json b/manifest.json index 6bb4e87..38317f6 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Offer backup storage to a friend.", "fr": "Offrez un espace de stockage à un⋅e ami⋅e." }, - "version": "1.1.16~ynh5", + "version": "1.1.16~ynh6", "url": "https://borgbackup.readthedocs.io", "license": "BSD-3-Clause", "maintainer": { 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 #=================================================