diff --git a/manifest.json b/manifest.json index 2883421..4c864be 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Open-source pastebin allowing to upload texts", "fr": "Pastebin open-source permettant de mettre en ligne du texte" }, - "version": "0.1.0~ynh6", + "version": "0.1.0~ynh7", "url": "https://github.com/seejohnrun/haste-server", "license": "MIT", "maintainer": { diff --git a/scripts/install b/scripts/install index 780a33c..a56291a 100755 --- a/scripts/install +++ b/scripts/install @@ -95,8 +95,8 @@ ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version # ADD SYSTEMD SERVICE #================================================= -ynh_replace_string --match_string="__ENV_PATH__" --replace_string="$PATH" --target_file="../conf/systemd.service" -ynh_replace_string --match_string="__YNH_NPM__" --replace_string="$ynh_npm" --target_file="../conf/systemd.service" +ynh_replace_string --match_string="__ENV_PATH__" --replace_string="$PATH" --target_file="../conf/systemd.service" +ynh_replace_string --match_string="__YNH_NPM__" --replace_string="$ynh_npm" --target_file="../conf/systemd.service" ynh_add_systemd_config @@ -146,8 +146,9 @@ cp ../conf/haste.sh /usr/bin/$app # SECURE FILES AND DIRECTORIES #================================================= -chown -R root: $final_path -chown -R $app: "$final_path/static" +chmod 750 "$final_path" +chmod -R o-rwx "$final_path" +chown -R $app:www-data "$final_path" chown -R $app: $data_path chmod +x /usr/bin/$app diff --git a/scripts/restore b/scripts/restore index 556d104..523831b 100755 --- a/scripts/restore +++ b/scripts/restore @@ -84,9 +84,10 @@ ynh_restore_file --origin_path="/usr/bin/$app" # SECURE FILES AND DIRECTORIES #================================================= -chown -R root: $final_path -chown -R $app: "$final_path/static" -chown -R $app: "/home/yunohost.app/$app" +chmod 750 "$final_path" +chmod -R o-rwx "$final_path" +chown -R $app:www-data "$final_path" +chown -R $app: $data_path chmod +x /usr/bin/$app #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 3addda7..e6e8bd6 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -157,8 +157,9 @@ cp ../conf/haste.sh /usr/bin/$app # SECURE FILES AND DIRECTORIES #================================================= -chown -R root: $final_path -chown -R $app: "$final_path/static" +chmod 750 "$final_path" +chmod -R o-rwx "$final_path" +chown -R $app:www-data "$final_path" chown -R $app: $data_path chmod +x /usr/bin/$app