From 70282fb0918730b1a788b6b9150a9cbe93434c04 Mon Sep 17 00:00:00 2001 From: wh1te909 Date: Sun, 9 Feb 2020 22:14:05 +0000 Subject: [PATCH] fix script permissions --- api/tacticalrmm/checks/scriptviews.py | 2 +- install.sh | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/api/tacticalrmm/checks/scriptviews.py b/api/tacticalrmm/checks/scriptviews.py index c1419bd7..d0278e80 100644 --- a/api/tacticalrmm/checks/scriptviews.py +++ b/api/tacticalrmm/checks/scriptviews.py @@ -97,7 +97,7 @@ def download_script(request, pk): return response else: response = HttpResponse() - response["Content-Disposition"] = "attachment; filename=debug.log" + response["Content-Disposition"] = f"attachment; filename={script.filename}" response["X-Accel-Redirect"] = f"/protectedscripts/{script.filename}" return response diff --git a/install.sh b/install.sh index 370ee983..b70445ac 100755 --- a/install.sh +++ b/install.sh @@ -527,9 +527,9 @@ sudo mkdir -p /srv/salt sudo cp -r /home/${USER}/rmm/_modules /srv/salt/ sudo cp -r /home/${USER}/rmm/scripts /srv/salt/ sudo mkdir /srv/salt/scripts/userdefined -sudo chown root:root -R /srv/salt/ -sudo chown root:${USER} -R /srv/salt/scripts/ -sudo chmod 770 -R /srv/salt/scripts/ +sudo chown ${USER}:${USER} -R /srv/salt/ +sudo chown ${USER}:www-data /srv/salt/scripts/userdefined +sudo chmod 750 /srv/salt/scripts/userdefined meshservice="$(cat << EOF [Unit]