From f85a766319efae42b835d7ea1e74996cdd61ecc9 Mon Sep 17 00:00:00 2001 From: Michael Stanclift Date: Tue, 26 May 2020 22:44:30 -0500 Subject: [PATCH] Fix permissions issue --- gravity-sync.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gravity-sync.sh b/gravity-sync.sh index 08bf46b..d57f849 100755 --- a/gravity-sync.sh +++ b/gravity-sync.sh @@ -154,7 +154,7 @@ function pull_gs { echo -en "${STAT} ${MESSAGE}" GRAVDB_RWE=$(namei -m ${PIHOLE_DIR}/${GRAVITY_FI} | grep -v f: | grep ${GRAVITY_FI} | awk '{print $1}') - if [ $GRAVDB_RWE = "-rw-r--r--" ] + if [ $GRAVDB_RWE = "-rw-rw-r--" ] then echo -e "\r${GOOD} ${MESSAGE}" else @@ -165,7 +165,7 @@ function pull_gs { MESSAGE="Setting Ownership on ${GRAVITY_FI}" echo -en "${STAT} ${MESSAGE}" - sudo chmod 644 ${PIHOLE_DIR}/${GRAVITY_FI} >/dev/null 2>&1 + sudo chmod 664 ${PIHOLE_DIR}/${GRAVITY_FI} >/dev/null 2>&1 error_validate fi @@ -211,7 +211,7 @@ function push_gs { MESSAGE="Setting Permissions on ${GRAVITY_FI}" echo -en "${STAT} ${MESSAGE}" - ${SSHPASSWORD} ssh ${REMOTE_USER}@${REMOTE_HOST} "sudo chmod 644 ${PIHOLE_DIR}/${GRAVITY_FI}" >/dev/null 2>&1 + ${SSHPASSWORD} ssh ${REMOTE_USER}@${REMOTE_HOST} "sudo chmod 664 ${PIHOLE_DIR}/${GRAVITY_FI}" >/dev/null 2>&1 error_validate MESSAGE="Setting Ownership on ${GRAVITY_FI}"