Skip to content

Commit

Permalink
Fix folder permission check
Browse files Browse the repository at this point in the history
- Affecting MAC and Linux

Signed-off-by: Wade Barnes <wade@neoterictech.ca>
  • Loading branch information
WadeBarnes committed Jan 22, 2024
1 parent b041b9a commit 95db705
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions manage
Original file line number Diff line number Diff line change
Expand Up @@ -857,12 +857,15 @@ function checkFolderPermissions() {
}

function setFolderReadWriteAll() {
folder=${1}
permissions=$(stat ${STAT_OPS} ${folder})

if [[ "${permissions:0-1}" != 5 ]]; then
echo "Setting ${folder} to read/write for all users ..."
chmod a+rws ${folder}
# This has no impact on Windows. The chmod command will run but the permissions don't actually change.
if [[ "$OSTYPE" != "msys" ]]; then
folder=${1}
permissions=$(stat ${STAT_OPS} ${folder})

if [[ "${permissions:0-1}" != 7 ]]; then
echo "Setting ${folder} to read/write for all users ..."
chmod a+rws ${folder}
fi
fi
}

Expand Down

0 comments on commit 95db705

Please sign in to comment.