From 60b8ab1ae2b1950d1334abed689f08edfa9bce52 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Wed, 19 May 2021 01:53:08 +0200 Subject: [PATCH] Fix rights --- scripts/install | 4 ++++ scripts/restore | 4 ++++ scripts/upgrade | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/scripts/install b/scripts/install index 3ad95a7..0058f20 100755 --- a/scripts/install +++ b/scripts/install @@ -108,6 +108,10 @@ ynh_script_progression --message="Customizing couchdb config..." --weight=2 # customize a bit the couch config ynh_add_config --template="../conf/couch_ynh.ini" --destination="$final_path/etc/local.d/couch_ynh.ini" +chmod 750 "$final_path" +chmod -R o-rwx "$final_path" +chown -R $app:$app "$final_path" + #================================================= # SETUP LOGROTATE #================================================= diff --git a/scripts/restore b/scripts/restore index 139a1db..850782a 100755 --- a/scripts/restore +++ b/scripts/restore @@ -99,6 +99,10 @@ apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 8756C4F765C9AC3CB6B85D6 ynh_install_extra_app_dependencies --repo="https://apache.bintray.com/couchdb-deb buster main" --package="couchdb" # ynh_install_extra_app_dependencies --repo="https://apache.bintray.com/couchdb-deb buster main" --package="couchdb" --key="https://apache.bintray.com/couchdb-deb/dists/buster/Release.gpg" +chmod 750 "$final_path" +chmod -R o-rwx "$final_path" +chown -R $app:$app "$final_path" + #================================================= # INTEGRATE SERVICE IN YUNOHOST #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index c4d3680..a3487bf 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -104,6 +104,10 @@ ynh_script_progression --message="Updating a configuration file..." ynh_add_config --template="../conf/couch_ynh.ini" --destination="$final_path/etc/local.d/couch_ynh.ini" +chmod 750 "$final_path" +chmod -R o-rwx "$final_path" +chown -R $app:$app "$final_path" + #================================================= # GENERIC FINALIZATION #=================================================