diff --git a/scripts/upgrade b/scripts/upgrade index 753195c..1ddf72a 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -97,6 +97,10 @@ then ynh_setup_source --dest_dir="$final_path" fi +chmod 750 "$final_path" +chmod -R o-rwx "$final_path" +chown -R $app:www-data "$final_path" + #================================================= # NGINX CONFIGURATION #================================================= @@ -131,6 +135,8 @@ then ynh_script_progression --message="Upgrading Ampache configuration..." ynh_add_config --template="../conf/ampache.cfg.php" --destination="$final_path/config/ampache.cfg.php" + chmod 600 "$final_path/config/ampache.cfg.php" + chown $app:$app "$final_path/config/ampache.cfg.php" #================================================= # UPDATE AMPACHE WITH COMPOSER @@ -170,17 +176,6 @@ then sleep 1 fi -#================================================= -# GENERIC FINALIZATION -#================================================= -# SECURE FILES AND DIRECTORIES -#================================================= -ynh_script_progression --message="Securing files and directories..." - -# Set permissions on app files -chown -R $app:$app $final_path -chmod 600 $final_path/config/ampache.cfg.php - #================================================= # SETUP SSOWAT #=================================================