fix(nextcloud): temporary patch broken permission init (#5625)

* fix(nextcloud): temporary patch broken permission init

Signed-off-by: Kjeld Schouten-Lebbing <kjeld@schouten-lebbing.nl>

* Update Chart.yaml

Signed-off-by: Kjeld Schouten-Lebbing <kjeld@schouten-lebbing.nl>

* Update charts/stable/nextcloud/values.yaml

Signed-off-by: Kjeld Schouten-Lebbing <kjeld@schouten-lebbing.nl>

* Update charts/stable/nextcloud/values.yaml

Signed-off-by: Kjeld Schouten-Lebbing <kjeld@schouten-lebbing.nl>

* Update charts/stable/nextcloud/values.yaml

Signed-off-by: Kjeld Schouten-Lebbing <kjeld@schouten-lebbing.nl>

Signed-off-by: Kjeld Schouten-Lebbing <kjeld@schouten-lebbing.nl>
This commit is contained in:
Kjeld Schouten-Lebbing
2022-12-22 15:12:58 +01:00
committed by GitHub
parent e0cec129b6
commit b7eac5281c
2 changed files with 5 additions and 16 deletions
+1 -1
View File
@@ -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
+4 -15
View File
@@ -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: