From ebc37ebae4261db869b6ccabf6a4c80b0070b5fb Mon Sep 17 00:00:00 2001 From: wh1te909 Date: Tue, 25 Aug 2020 00:38:23 +0000 Subject: [PATCH] reset perms during update in case was previously run as root --- update.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/update.sh b/update.sh index 1f5e7d49..88698772 100644 --- a/update.sh +++ b/update.sh @@ -1,6 +1,6 @@ #!/bin/bash -SCRIPT_VERSION="4" +SCRIPT_VERSION="5" SCRIPT_URL='https://raw.githubusercontent.com/wh1te909/tacticalrmm/develop/update.sh' YELLOW='\033[1;33m' GREEN='\033[0;32m' @@ -29,6 +29,14 @@ do sudo systemctl stop ${i} done +sudo chown ${USER}:${USER} -R /rmm +sudo chown ${USER}:${USER} /var/log/celery +sudo chown ${USER}:${USER} -R /srv/salt/ +sudo chown ${USER}:www-data /srv/salt/scripts/userdefined +sudo chown -R $USER:$GROUP /home/${USER}/.npm +sudo chown -R $USER:$GROUP /home/${USER}/.config +sudo chmod 750 /srv/salt/scripts/userdefined + cd /rmm git fetch origin develop git reset --hard FETCH_HEAD @@ -67,6 +75,7 @@ sudo systemctl start ${i} done sudo systemctl stop meshcentral +sudo chown ${USER}:${USER} -R /meshcentral cd /meshcentral rm -rf node_modules/ npm install meshcentral@latest