Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/vm.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Hansson <mailto@danielhansson.nu>2022-10-14 11:52:56 +0300
committerGitHub <noreply@github.com>2022-10-14 11:52:56 +0300
commitb048bb5ecde60bed989087c995045ef5192fb6b7 (patch)
tree0bb9b3b2c00122a5ec94d939b6e573202127ca8e
parent99b612a3a4d1fc069be5230fd179e99f25d27c26 (diff)
only chown if existing
Signed-off-by: Daniel Hansson <mailto@danielhansson.nu>
-rw-r--r--static/setup_secure_permissions_nextcloud.sh7
1 files changed, 5 insertions, 2 deletions
diff --git a/static/setup_secure_permissions_nextcloud.sh b/static/setup_secure_permissions_nextcloud.sh
index 80309d09..fdbb24f8 100644
--- a/static/setup_secure_permissions_nextcloud.sh
+++ b/static/setup_secure_permissions_nextcloud.sh
@@ -73,7 +73,7 @@ then
fi
# Nextcloud datafolder
-if [ -d "$NCDATA" ]
+if [ -d "${NCDATA}" ]
then
# Always chown root dir
chown "${htuser}":"${htgroup}" "${NCDATA}"/
@@ -83,7 +83,10 @@ then
chown -R "${htuser}":"${htgroup}" "${NCDATA}"/
fi
# Also always chown files_external (https://github.com/nextcloud/vm/issues/2398)
- chown -R "${htuser}":"${htgroup}" "${NCDATA}"/files_external
+ if [ -d "${NCDATA}"/files_external ]
+ then
+ chown -R "${htuser}":"${htgroup}" "${NCDATA}"/files_external
+ fi
fi
chmod +x "${NCPATH}"/occ