diff --git a/scripts/backup b/scripts/backup index a66a5bc..75e9f52 100644 --- a/scripts/backup +++ b/scripts/backup @@ -63,17 +63,6 @@ then ynh_mysql_dump_db --database="$db_name" > db.sql fi -#================================================= -# BACKUP SPECIFIC FILES -#================================================= - -if [ $with_sftp -eq 1 ] -then - ynh_print_info --message="Backup specific files..." - - ynh_backup "/usr/share/yunohost/hooks/conf_regen/90-ssh_$app" -fi - #================================================= # END OF SCRIPT #================================================= diff --git a/scripts/install b/scripts/install index 03cc8dc..e9e3108 100644 --- a/scripts/install +++ b/scripts/install @@ -128,7 +128,7 @@ name: ${db_name}\nuser: ${db_name}\npass: ${db_pwd}" > ../sources/db_access.txt cp -r "../sources/db_access.txt" "$final_path/db_access.txt" fi -chown -R $app: "$final_path" +chown -R $app:www-data "$final_path" # Home directory of the user needs to be owned by root to allow # SFTP connections chown root:root "$final_path" diff --git a/scripts/remove b/scripts/remove index f39cde3..e9952b0 100644 --- a/scripts/remove +++ b/scripts/remove @@ -64,15 +64,6 @@ ynh_remove_fpm_config #================================================= # SPECIFIC REMOVE #================================================= -# REMOVE THE CUSTOM SSH CONFIG -#================================================= - -if [ $with_sftp -eq 1 ] -then - ynh_script_progression --message="Removing the custom SSH config..." - ynh_secure_remove --file="/usr/share/yunohost/hooks/conf_regen/90-ssh_$app" - yunohost tools regen-conf ssh -fi #================================================= # GENERIC FINALIZATION diff --git a/scripts/restore b/scripts/restore index 5824cb5..49f60fc 100644 --- a/scripts/restore +++ b/scripts/restore @@ -90,7 +90,7 @@ ynh_script_progression --message="Restoring the app main directory..." ynh_restore_file --origin_path="$final_path" # Restore permissions on app files -chown -R $app: "$final_path" +chown -R $app:www-data "$final_path" # Home directory of the user needs to be owned by root to allow # SFTP connections chown root:root "$final_path" diff --git a/scripts/upgrade b/scripts/upgrade index 7ba3989..05cb55a 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -147,8 +147,6 @@ ynh_script_progression --message="Making sure dedicated system user exists..." - if [ $with_sftp -eq 1 ] then - # Add the password to this user - chpasswd <<< "${app}:${password}" groups="sftp.app" else groups="" @@ -189,7 +187,7 @@ fi # SECURE FILES AND DIRECTORIES #================================================= -chown -R $app: "$final_path" +chown -R $app:www-data "$final_path" # Home directory of the user needs to be owned by root to allow # SFTP connections chown root:root "$final_path"