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 <github@hanssonit.se>2020-08-06 22:09:28 +0300
committerGitHub <noreply@github.com>2020-08-06 22:09:28 +0300
commit3a1c522a3341a14f317a399544946dde0a4c9606 (patch)
tree1d022294651a17fe81506229d39be7c43be62de2 /static/setup_secure_permissions_nextcloud.sh
parentc1aab651612183f5a0914b2772950524d9040321 (diff)
check if update.log exists
Diffstat (limited to 'static/setup_secure_permissions_nextcloud.sh')
-rw-r--r--static/setup_secure_permissions_nextcloud.sh6
1 files changed, 5 insertions, 1 deletions
diff --git a/static/setup_secure_permissions_nextcloud.sh b/static/setup_secure_permissions_nextcloud.sh
index 4c07e8a3..bf458ac5 100644
--- a/static/setup_secure_permissions_nextcloud.sh
+++ b/static/setup_secure_permissions_nextcloud.sh
@@ -54,12 +54,16 @@ print_text_in_color "$ICyan" "chown Directories"
chown -R "${rootuser}":"${htgroup}" "${VMLOGS}"/
chown "${htuser}":"${htgroup}" "${VMLOGS}"/nextcloud.log
chown "${htuser}":"${htgroup}" "${VMLOGS}"/audit.log
-chown "${rootuser}":"${rootuser}" "${VMLOGS}"/update.log
chown -R "${rootuser}":"${htgroup}" "${NCPATH}"/
chown -R "${htuser}":"${htgroup}" "${NCPATH}"/apps/
chown -R "${htuser}":"${htgroup}" "${NCPATH}"/config/
chown -R "${htuser}":"${htgroup}" "${NCPATH}"/themes/
chown -R "${htuser}":"${htgroup}" "${NCPATH}"/updater/
+if [ -f "${VMLOGS}"/update.log ]
+then
+ chown "${rootuser}":"${rootuser}" "${VMLOGS}"/update.log
+fi
+
if ! [ "$(ls -ld "${NCDATA}" | awk '{print$3$4}')" == "${htuser}""${htgroup}" ]
then
chown -R "${htuser}":"${htgroup}" "${NCDATA}"/