diff --git a/manifest.json b/manifest.json index d077c95..f4da9df 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Alternative front-end for Twitter that respects your privacy", "fr": "Interface alternative pour Twitter qui respecte votre vie privée" }, - "version": "0.2021.02.16~ynh1", + "version": "0.2021.02.16~ynh2", "url": "https://github.com/zedeus/nitter", "license": "AGPL-3.0-only", "maintainer": { diff --git a/scripts/install b/scripts/install index 734a612..cc1de53 100755 --- a/scripts/install +++ b/scripts/install @@ -232,8 +232,10 @@ ynh_add_config --template="nitter.conf" --destination="$final_path/nitter.conf" ### that really need such authorization. # Set permissions to app files -chown -R root: $final_path -chown -R $app: $final_path/tmp +chown -R root:$app $final_path +chown -R $app:$app $final_path/tmp +chmod -R o-rwx $final_path +chmod -R g-w $final_path #================================================= # INTEGRATE SERVICE IN YUNOHOST diff --git a/scripts/restore b/scripts/restore index 2da9f8a..6a6fe13 100755 --- a/scripts/restore +++ b/scripts/restore @@ -65,16 +65,6 @@ ynh_script_progression --message="Recreating the dedicated system user..." --wei # Create the dedicated user (if not existing) ynh_system_user_create --username=$app -#================================================= -# RESTORE USER RIGHTS -#================================================= - -# Restore permissions on app files -chown -R root: $final_path -chown -R $app: $final_path/tmp - -#================================================= -# SPECIFIC RESTORATION #================================================= # REINSTALL DEPENDENCIES #================================================= @@ -83,6 +73,18 @@ ynh_script_progression --message="Reinstalling dependencies..." --weight=1 # Define and install dependencies ynh_install_app_dependencies $pkg_dependencies +#================================================= +# RESTORE USER RIGHTS +#================================================= + +# Restore permissions on app files +chown -R root:$app $final_path +chown -R $app:$app $final_path/tmp +chmod -R o-rwx $final_path +chmod -R g-w $final_path + +#================================================= +# SPECIFIC RESTORATION #================================================= # RESTORE SYSTEMD #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index a5b23b6..effc991 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -151,8 +151,10 @@ ynh_add_config --template="nitter.conf" --destination="$final_path/nitter.conf" #================================================= # Set permissions on app files -chown -R root: $final_path -chown -R $app: $final_path/tmp +chown -R root:$app $final_path +chown -R $app:$app $final_path/tmp +chmod -R o-rwx $final_path +chmod -R g-w $final_path #================================================= # INTEGRATE SERVICE IN YUNOHOST