Skip to content

Commit 71104d5

Browse files
authored
fix #795 (#811)
1 parent 592ec6f commit 71104d5

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

static/setup_secure_permissions_nextcloud.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# T&M Hansson IT AB © - 2019, https://www.hanssonit.se/
44

5-
# shellcheck disable=2034,2059
5+
# shellcheck disable=2034,2059,2012
66
true
77
# shellcheck source=lib.sh
88
. <(curl -sL https://raw.githubusercontent.com/nextcloud/vm/master/lib.sh)
@@ -30,9 +30,12 @@ printf "chown Directories\n"
3030
chown -R ${rootuser}:${htgroup} ${NCPATH}/
3131
chown -R ${htuser}:${htgroup} ${NCPATH}/apps/
3232
chown -R ${htuser}:${htgroup} ${NCPATH}/config/
33-
chown -R ${htuser}:${htgroup} ${NCDATA}/
3433
chown -R ${htuser}:${htgroup} ${NCPATH}/themes/
3534
chown -R ${htuser}:${htgroup} ${NCPATH}/updater/
35+
if ! [ "$(ls -ld ${NCDATA} | awk '{print$3$4}')" == ${htuser}${htgroup} ]
36+
then
37+
chown -R ${htuser}:${htgroup} ${NCDATA}/
38+
fi
3639

3740
chmod +x ${NCPATH}/occ
3841

0 commit comments

Comments
 (0)