From 201d9a89057332d88250c1035dbbfe88b0297e0c Mon Sep 17 00:00:00 2001 From: Jules Bertholet Date: Mon, 31 May 2021 16:59:41 -0400 Subject: [PATCH] Calm down package-lint --- scripts/restore | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/scripts/restore b/scripts/restore index afa4fa2..dc92643 100644 --- a/scripts/restore +++ b/scripts/restore @@ -110,10 +110,18 @@ systemctl enable $app.service --quiet #================================================= # RESTORE SUDOERS #================================================= -ynh_script_progression --message="Restoring sudo configuration..." --weight=2 +ynh_script_progression --message="Restoring sudoers configuration..." --weight=2 ynh_restore_file --origin_path="/etc/sudoers.d/$app-sudoers" -set_config_permissions + +# Set permissions on app files +chmod 550 "$final_path/.venv/bin/sudospawner-singleuser" +chown -R $app:$app "$final_path" +chmod -R g=u,g-w,o-rwx "$final_path" +setfacl -nR -m g:$app.main:rx -m d:g:$app.main:rx "$final_path/.venv" +setfacl -n -m g:$app.main:x "$final_path" +chown root:root "/etc/sudoers.d/$app-sudoers" +chmod 440 "/etc/sudoers.d/$app-sudoers" #================================================= # ADVERTISE SERVICE IN ADMIN PANEL