From 3823520830bd066a361e379f4244d3851ab5d180 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Thu, 13 May 2021 16:17:34 +0200 Subject: [PATCH 1/4] Fix permissions in install --- scripts/install | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index 2643c4f..1af354d 100644 --- a/scripts/install +++ b/scripts/install @@ -215,9 +215,10 @@ ynh_app_setting_set --app=$app --key=final_path --value=$final_path mkdir -pm 0755 ${final_path}/ cp -a ../sources/* ${final_path}/ -chown -R $app: ${final_path}/ +chown -R $app:$app ${final_path}/ chmod -R 0644 ${final_path}/* find ${final_path}/ -type d -exec chmod +x {} \; +chmod o-rwx ${final_path} #================================================= # NGINX CONFIGURATION @@ -249,6 +250,7 @@ echo "DAEMON_CONF=/etc/hostapd/hostapd.conf" > /etc/default/hostapd # Apply configuration ynh_add_config --template="config.php.tpl" --destination="$final_path/config.php" +chown $app:$app "$final_path/config.php" # Set default inits # The boot order of these services are important, so they are disabled by default From 79956b5f462b49ab1af3f16fb24bc5ec3383239f Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Thu, 13 May 2021 16:19:09 +0200 Subject: [PATCH 2/4] Fix permissions in upgrade --- scripts/upgrade | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index d6df7a7..ee7beb6 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -163,6 +163,7 @@ ynh_replace_string --match_string="__PHPVERSION__" --replace_string="${phpversio ynh_script_progression --message="Modifying a config file..." ynh_add_config --template="config.php.tpl" --destination="$final_path/config.php" +chown $app:$app "$final_path/config.php" #================================================= # SETUP SYSTEMD @@ -180,9 +181,10 @@ ynh_add_systemd_config --service=$service_name ynh_script_progression --message="Securing files and directories..." # Set permissions on app files -chown -R $app: ${final_path}/ +chown -R $app:$app ${final_path}/ chmod -R 0644 ${final_path}/* find ${final_path}/ -type d -exec chmod +x {} \; +chmod o-rwx "${final_path}" #================================================= # INTEGRATE SERVICE IN YUNOHOST From 36631730000bd4f874c4cbf0a9bc6352256c633c Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Thu, 13 May 2021 16:20:18 +0200 Subject: [PATCH 3/4] Fix permissions in restore --- scripts/restore | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/restore b/scripts/restore index 9093bb9..bc1c089 100644 --- a/scripts/restore +++ b/scripts/restore @@ -97,7 +97,10 @@ ynh_system_user_create --username=$app ynh_script_progression --message="Restoring user rights..." # Restore permissions on app files -chown -R $app: $final_path +chown -R $app:$app ${final_path}/ +chmod -R 0644 ${final_path}/* +find ${final_path}/ -type d -exec chmod +x {} \; +chmod o-rwx ${final_path} #================================================= # RESTORE THE PHP-FPM CONFIGURATION From ca997cb3479caa50ded99aa7e416efbdb3497b12 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Thu, 13 May 2021 16:26:56 +0200 Subject: [PATCH 4/4] Bump version number --- manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index 56d0121..6727fcd 100644 --- a/manifest.json +++ b/manifest.json @@ -7,7 +7,7 @@ "fr": "Créer et configurer des réseaux wifi, partager l'accès a Internet et utiliser les applications Yunohost via wifi" }, "url": "https://github.com/labriqueinternet/hotspot_ynh", - "version": "1.2.0~ynh3", + "version": "1.2.0~ynh4", "license": "AGPL-3.0", "maintainer": { "name": "Julien Vaubourg",