diff options
author | Daniel Hansson <github@hanssonit.se> | 2020-12-21 21:54:07 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-21 21:54:07 +0300 |
commit | d1307cdc01210939c0534f9c9cafabd6727460fc (patch) | |
tree | 143b4d47edf84be950f6f8546d2144d4fb04f204 /static/setup_secure_permissions_nextcloud.sh | |
parent | 94dd2b6f0ecbb4e8c06e335e53c06ba3cdc9c4ba (diff) |
change permissions based on prevoius bug
https://github.com/nextcloud/vm/issues/1715#issuecomment-749003043
Also, lower the depth since it takes forever with large folder structures.
Diffstat (limited to 'static/setup_secure_permissions_nextcloud.sh')
-rw-r--r-- | static/setup_secure_permissions_nextcloud.sh | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/static/setup_secure_permissions_nextcloud.sh b/static/setup_secure_permissions_nextcloud.sh index 7bff1f16..31ff1f94 100644 --- a/static/setup_secure_permissions_nextcloud.sh +++ b/static/setup_secure_permissions_nextcloud.sh @@ -78,7 +78,7 @@ then # Always chown root dir chown "${htuser}":"${htgroup}" "${NCDATA}"/ # Check subdirs as well - if find "${NCDATA}" -maxdepth 4 -type d -exec stat --printf='%U:%G\n' {} \; | grep -v "${htuser}:${htgroup}" + if find "${NCDATA}" -maxdepth 2 -type d -exec stat --printf='%U:%G\n' {} \; | grep -v "${htuser}":"${htgroup}" then chown -R "${htuser}":"${htgroup}" "${NCDATA}"/ fi @@ -90,11 +90,11 @@ print_text_in_color "$ICyan" "chmod/chown .htaccess" if [ -f "${NCPATH}"/.htaccess ] then chmod 0644 "${NCPATH}"/.htaccess - chown "${rootuser}":"${htgroup}" "${NCPATH}"/.htaccess + chown "${htuser}":"${htgroup}" "${NCPATH}"/.htaccess fi if [ -f "${NCDATA}"/.htaccess ] then chmod 0644 "${NCDATA}"/.htaccess - chown "${rootuser}":"${htgroup}" "${NCDATA}"/.htaccess + chown "${htuser}":"${htgroup}" "${NCDATA}"/.htaccess fi |