diff --git a/manifest.json b/manifest.json index fc84d62..4d44854 100644 --- a/manifest.json +++ b/manifest.json @@ -17,7 +17,7 @@ "email": "" }, "requirements": { - "yunohost": ">= 4.1.7" + "yunohost": ">= 4.2.4" }, "multi_instance": false, "services": [ diff --git a/scripts/install b/scripts/install index 628a39d..cd008f7 100644 --- a/scripts/install +++ b/scripts/install @@ -87,16 +87,20 @@ ynh_add_fpm_config --usage=low --footprint=low # SECURE FILES AND DIRECTORIES #================================================= -# Set right permissions for curl install -chown -R $app: $final_path +chmod 750 "$final_path" +chmod -R o-rwx "$final_path" +chown -R $app:www-data "$final_path" #================================================= # SETUP SSOWAT #================================================= ynh_script_progression --message="Configuring permissions..." --weight=1 -# Make app public if necessary or protect it -[ $is_public -eq 0 ] || ynh_permission_update --permission="main" --add="visitors" +# Make app public if necessary +if [ $is_public -eq 1 ] +then + ynh_permission_update --permission="main" --add="visitors" +fi #================================================= # RELOAD NGINX diff --git a/scripts/restore b/scripts/restore index 080f407..e511c60 100644 --- a/scripts/restore +++ b/scripts/restore @@ -65,7 +65,9 @@ ynh_system_user_create --username=$app #================================================= # Restore permissions on app files -chown -R $app: $final_path +chmod 750 "$final_path" +chmod -R o-rwx "$final_path" +chown -R $app:www-data "$final_path" #================================================= # RESTORE THE PHP-FPM CONFIGURATION diff --git a/scripts/upgrade b/scripts/upgrade index e4e0fcf..9d067c9 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -79,7 +79,10 @@ ynh_add_fpm_config --usage=low --footprint=low #================================================= cp -a ../sources/* $final_path -chown -R $app: $final_path + +chmod 750 "$final_path" +chmod -R o-rwx "$final_path" +chown -R $app:www-data "$final_path" #================================================= # NGINX CONFIGURATION