Skip to content

Commit

Permalink
Merge pull request #290 from WadeBarnes/folder-permissions
Browse files Browse the repository at this point in the history
Fix folder permission check
  • Loading branch information
esune authored Jan 22, 2024
2 parents b041b9a + 95db705 commit 7ed127c
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 7ed127c

Please sign in to comment.