From efbec554c09eb2823090358a6658992e512d4c4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment?= Date: Sun, 7 Jun 2020 20:01:41 +0200 Subject: [PATCH 1/2] better permissions --- manifest.json | 2 +- scripts/install | 8 +++----- scripts/restore | 4 +++- scripts/upgrade | 4 +++- 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/manifest.json b/manifest.json index 26cda94..8a0556f 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "A simple server for sending and receiving messages.", "fr": "Un simple serveur pour envoyer et recevoir des messages." }, - "version": "2.0.16~ynh1", + "version": "2.0.16~ynh2", "url": "http://gotify.net", "license": "MIT", "maintainer": { diff --git a/scripts/install b/scripts/install index eab084b..19d5cf8 100755 --- a/scripts/install +++ b/scripts/install @@ -137,12 +137,10 @@ ynh_store_file_checksum "$final_path/config.yml" #================================================= # Set permissions to app files -chown -R root: $final_path +chown -R root:$app $final_path mkdir $final_path/data -chown -R root:$app $final_path/* -chmod -R 550 $final_path/* -chown $app $final_path/data -chmod 770 $final_path/data +chown -R $app: $final_path/data/ +chmod o-rwx $final_path/ -R #================================================= # ADVERTISE SERVICE IN ADMIN PANEL diff --git a/scripts/restore b/scripts/restore index 4b31907..0f8e3c0 100755 --- a/scripts/restore +++ b/scripts/restore @@ -76,8 +76,10 @@ ynh_system_user_create $app #================================================= # Restore permissions on app files -chown -R root: $final_path +chown -R root:$app $final_path +mkdir $final_path/data chown -R $app: $final_path/data/ +chmod o-rwx $final_path/ -R #================================================= # SPECIFIC RESTORATION diff --git a/scripts/upgrade b/scripts/upgrade index 1f53155..67c663e 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -138,7 +138,9 @@ ynh_add_systemd_config #================================================= # Set permissions on app files -chown -R root: $final_path +chown -R root:$app $final_path/ +chown -R $app: $final_path/data/ +chmod o-rwx $final_path/ -R # If data directory doesn't exists if [ -z $final_path/data ]; then From de0bc0994281ec9adeeebb45a7c3cbf3c10b0230 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment?= Date: Sun, 7 Jun 2020 20:02:21 +0200 Subject: [PATCH 2/2] small clean --- README_fr.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/README_fr.md b/README_fr.md index b065992..26b390e 100644 --- a/README_fr.md +++ b/README_fr.md @@ -37,9 +37,7 @@ Pas de support de LDAP * Pas de support de LDAP (non implémenté upstream) -## Links - -## Links +## Liens * Signaler un bug: https://github.com/YunoHost-Apps/gotify_ynh/issues * Site de l'application: https://gotify.net/