From b7eac5281c7ca9b225ac0d8f970af44f756d4ac8 Mon Sep 17 00:00:00 2001 From: Kjeld Schouten-Lebbing Date: Thu, 22 Dec 2022 15:12:58 +0100 Subject: [PATCH] fix(nextcloud): temporary patch broken permission init (#5625) * fix(nextcloud): temporary patch broken permission init Signed-off-by: Kjeld Schouten-Lebbing * Update Chart.yaml Signed-off-by: Kjeld Schouten-Lebbing * Update charts/stable/nextcloud/values.yaml Signed-off-by: Kjeld Schouten-Lebbing * Update charts/stable/nextcloud/values.yaml Signed-off-by: Kjeld Schouten-Lebbing * Update charts/stable/nextcloud/values.yaml Signed-off-by: Kjeld Schouten-Lebbing Signed-off-by: Kjeld Schouten-Lebbing --- charts/stable/nextcloud/Chart.yaml | 2 +- charts/stable/nextcloud/values.yaml | 19 ++++--------------- 2 files changed, 5 insertions(+), 16 deletions(-) diff --git a/charts/stable/nextcloud/Chart.yaml b/charts/stable/nextcloud/Chart.yaml index b0ccea81239..f2435d937d4 100644 --- a/charts/stable/nextcloud/Chart.yaml +++ b/charts/stable/nextcloud/Chart.yaml @@ -37,7 +37,7 @@ sources: - https://github.com/nextcloud/docker - https://github.com/nextcloud/helm type: application -version: 19.0.26 +version: 19.0.27 annotations: truecharts.org/catagories: | - cloud diff --git a/charts/stable/nextcloud/values.yaml b/charts/stable/nextcloud/values.yaml index 443fbba4f3d..f304a8d27ec 100644 --- a/charts/stable/nextcloud/values.yaml +++ b/charts/stable/nextcloud/values.yaml @@ -93,7 +93,7 @@ probes: initContainers: prestart: - image: '{{ include "tc.common.images.selector" . }}' + image: "{{ .Values.ubuntuImage.repository }}:{{ .Values.ubuntuImage.tag }}" securityContext: runAsUser: 0 runAsGroup: 0 @@ -104,20 +104,9 @@ initContainers: - | /bin/bash <<'EOF' echo "Forcing permissions on userdata folder..." - if nfs4xdr_getfacl && nfs4xdr_getfacl | grep -qv "Failed to get NFSv4 ACL"; then - echo "NFSv4 ACLs detected, Trying to override permissions using nfs4_setfacl..." - nfs4_setfacl -R -a A:g:33:RWX "/var/www/html/data" - else - echo "No NFSv4 ACLs detected, trying to override permissions using chown/chmod..." - echo "checking ownership..." - if [ $(stat -c %g .) -eq 33 ]; then - echo "Ownership already set to 33, skipping..." - else - echo "Changing ownership to group 33..." - chown -R :33 "/var/www/html/data" - fi - chmod 770 /var/www/html/data - fi + echo "Trying to override ownship using nfs4xdr_winacl..." + /usr/bin/nfs4xdr_winacl -a chown -G 33 -r -c '/var/www/html/data' -p '/var/www/html/data' || echo "Failed setting ownership..." + chmod 770 /var/www/html/data || echo "Failed to chmod..." EOF volumeMounts: