From 1f4df22bbbd038c81315f08b80566c741e7b3416 Mon Sep 17 00:00:00 2001 From: Krakinou Date: Mon, 10 May 2021 23:19:36 +0200 Subject: [PATCH 1/2] change user to www-data --- manifest.json | 2 +- scripts/change_url | 2 +- scripts/install | 8 ++++---- scripts/restore | 2 +- scripts/upgrade | 6 +++--- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/manifest.json b/manifest.json index 50fa9c2..6221e4e 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Emulate videogames system and play videogames through your web browser... and more!", "fr": "Emulez des consoles de jeux et jouer à ces jeux vidéos dans votre explorateur web... Et beaucoup plus!" }, - "version": "1.9.1~ynh1", + "version": "1.9.1~ynh2", "url": "http://www.retroarch.com/", "license": "GPL-3.0-or-later", "maintainer": { diff --git a/scripts/change_url b/scripts/change_url index 400bdf2..cdc160a 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -61,7 +61,7 @@ fi change_path=0 if [ "$old_path" != "$new_path" ] then - ynh_print_warn "RetroArch works only on root path, path cannot be changed! + ynh_print_warn "RetroArch works only on www-data path, path cannot be changed! #change_path=1 fi diff --git a/scripts/install b/scripts/install index b898086..4d01829 100755 --- a/scripts/install +++ b/scripts/install @@ -94,12 +94,12 @@ chmod 666 $final_path/assets/cores/Game/README #setup indexer bash script ynh_add_config --template="../conf/indexer.sh" --destination="$final_path/indexer.sh" -chown root: $final_path/indexer.sh +chown www-data: $final_path/indexer.sh chmod 744 $final_path/indexer.sh #setup cron file cron_path="/etc/cron.d/$app" ynh_add_config --template="../conf/retroarch.cron" --destination="$cron_path" -chown root: "$cron_path" +chown www-data: "$cron_path" chmod 644 "$cron_path" #================================================= @@ -119,12 +119,12 @@ fi # Create a dedicated nginx config ynh_add_nginx_config -### For security reason, any app should set the permissions to root: before anything else. +### For security reason, any app should set the permissions to www-data: before anything else. ### Then, if write authorization is needed, any access should be given only to directories ### that really need such authorization. # Set permissions to app files -chown -R root: $final_path +chown -R www-data: $final_path #================================================= # SETUP SSOWAT diff --git a/scripts/restore b/scripts/restore index 88d687e..28c78dd 100755 --- a/scripts/restore +++ b/scripts/restore @@ -73,7 +73,7 @@ ynh_restore_file --origin_path="$final_path" #================================================= # Restore permissions on app files -chown -R root: $final_path +chown -R www-data: $final_path #================================================= # SPECIFIC RESTORATION diff --git a/scripts/upgrade b/scripts/upgrade index af27fcc..c34ff6a 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -73,12 +73,12 @@ fi #setup indexer bash script ynh_add_config --template="../conf/indexer.sh" --destination="$final_path/indexer.sh" -chown root: $final_path/indexer.sh +chown www-data: $final_path/indexer.sh chmod 744 $final_path/indexer.sh #setup cron file cron_path="/etc/cron.d/$app" ynh_add_config --template="../conf/retroarch.cron" --destination="$cron_path" -chown root: "$cron_path" +chown www-data: "$cron_path" chmod 644 "$cron_path" #================================================= @@ -119,7 +119,7 @@ ynh_npm install -g coffeescript # Set permissions on app files #================================================= # -chown -R root: $final_path +chown -R www-data: $final_path #================================================= From 655a80cbf52228382714b8c1fd08310519b085c3 Mon Sep 17 00:00:00 2001 From: Krakinou Date: Mon, 10 May 2021 23:20:58 +0200 Subject: [PATCH 2/2] root to www-data --- scripts/change_url | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/change_url b/scripts/change_url index cdc160a..400bdf2 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -61,7 +61,7 @@ fi change_path=0 if [ "$old_path" != "$new_path" ] then - ynh_print_warn "RetroArch works only on www-data path, path cannot be changed! + ynh_print_warn "RetroArch works only on root path, path cannot be changed! #change_path=1 fi