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:
@@ -37,7 +37,7 @@ sources:
|
|||||||
- https://github.com/nextcloud/docker
|
- https://github.com/nextcloud/docker
|
||||||
- https://github.com/nextcloud/helm
|
- https://github.com/nextcloud/helm
|
||||||
type: application
|
type: application
|
||||||
version: 19.0.26
|
version: 19.0.27
|
||||||
annotations:
|
annotations:
|
||||||
truecharts.org/catagories: |
|
truecharts.org/catagories: |
|
||||||
- cloud
|
- cloud
|
||||||
|
|||||||
@@ -93,7 +93,7 @@ probes:
|
|||||||
|
|
||||||
initContainers:
|
initContainers:
|
||||||
prestart:
|
prestart:
|
||||||
image: '{{ include "tc.common.images.selector" . }}'
|
image: "{{ .Values.ubuntuImage.repository }}:{{ .Values.ubuntuImage.tag }}"
|
||||||
securityContext:
|
securityContext:
|
||||||
runAsUser: 0
|
runAsUser: 0
|
||||||
runAsGroup: 0
|
runAsGroup: 0
|
||||||
@@ -104,20 +104,9 @@ initContainers:
|
|||||||
- |
|
- |
|
||||||
/bin/bash <<'EOF'
|
/bin/bash <<'EOF'
|
||||||
echo "Forcing permissions on userdata folder..."
|
echo "Forcing permissions on userdata folder..."
|
||||||
if nfs4xdr_getfacl && nfs4xdr_getfacl | grep -qv "Failed to get NFSv4 ACL"; then
|
echo "Trying to override ownship using nfs4xdr_winacl..."
|
||||||
echo "NFSv4 ACLs detected, Trying to override permissions using nfs4_setfacl..."
|
/usr/bin/nfs4xdr_winacl -a chown -G 33 -r -c '/var/www/html/data' -p '/var/www/html/data' || echo "Failed setting ownership..."
|
||||||
nfs4_setfacl -R -a A:g:33:RWX "/var/www/html/data"
|
chmod 770 /var/www/html/data || echo "Failed to chmod..."
|
||||||
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
|
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
|
|||||||
Reference in New Issue
Block a user