From d922d27119a26dd039febebb34c9cb33e2518d4e Mon Sep 17 00:00:00 2001 From: JensDiemer Date: Sun, 10 Oct 2021 12:14:54 +0200 Subject: [PATCH] Fix file permissions --- scripts/install | 8 ++++---- scripts/restore | 6 +++--- scripts/upgrade | 8 ++++---- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/scripts/install b/scripts/install index 3085b18..ef903ce 100755 --- a/scripts/install +++ b/scripts/install @@ -105,7 +105,7 @@ ynh_script_progression --message="Install project via pip..." --weight=80 python3 -m venv "${final_path}/venv" cp ../conf/requirements.txt "$final_path/requirements.txt" -chown -R "$app" "$final_path" +chown -R "$app:" "$final_path" #run source in a 'sub shell' ( @@ -204,9 +204,9 @@ yunohost service add $app --description="Web based management to catalog things" #================================================= # Set permissions to app files -chown -R "$app" "$log_path" -chown -R "$app" "$public_path" -chown -R "$app" "$final_path" +chown -R "$app:" "$log_path" +chown -R "$app:" "$public_path" +chown -R "$app:" "$final_path" #================================================= # SETUP SYSTEMD diff --git a/scripts/restore b/scripts/restore index 1302c03..dcd5ee0 100755 --- a/scripts/restore +++ b/scripts/restore @@ -70,8 +70,8 @@ ynh_system_user_create --username=$app --home_dir="$final_path" --use_shell #================================================= # Restore permissions on app files -chown -R "$app" "$public_path" -chown -R "$app" "$final_path" +chown -R "$app:" "$public_path" +chown -R "$app:" "$final_path" #================================================= # SPECIFIC RESTORATION @@ -112,7 +112,7 @@ yunohost service add $app --description="Web based management to catalog things" mkdir -p "$log_path" touch "${log_file}" -chown -R "$app" "$log_path" +chown -R "$app:" "$log_path" ynh_restore_file --origin_path="/etc/logrotate.d/$app" #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 5beb487..9ed9121 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -89,7 +89,7 @@ ynh_script_progression --message="Upgrade project via pip..." --weight=80 python3 -m venv "${final_path}/venv" cp ../conf/requirements.txt "$final_path/requirements.txt" -chown -R "$app" "$final_path" +chown -R "$app:" "$final_path" #run source in a 'sub shell' ( @@ -196,9 +196,9 @@ yunohost service add $app --description="Web based management to catalog things" #================================================= # Set permissions to app files -chown -R "$app" "$log_path" -chown -R "$app" "$public_path" -chown -R "$app" "$final_path" +chown -R "$app:" "$log_path" +chown -R "$app:" "$public_path" +chown -R "$app:" "$final_path" #================================================= # Start django_example_ynh via systemd