mirror of
https://github.com/nextcloud/all-in-one.git
synced 2025-12-20 06:26:57 +00:00
adjust permissions for Nextcloud's datadir
Signed-off-by: Simon L <szaimen@e.mail.de>
This commit is contained in:
parent
a5f9ff9c74
commit
d74ed475df
2 changed files with 5 additions and 5 deletions
|
|
@ -28,13 +28,10 @@ spec:
|
||||||
- chmod
|
- chmod
|
||||||
- "777"
|
- "777"
|
||||||
- /nextcloud-aio-nextcloud
|
- /nextcloud-aio-nextcloud
|
||||||
- /nextcloud-aio-nextcloud-data
|
|
||||||
- /nextcloud-aio-nextcloud-trusted-cacerts
|
- /nextcloud-aio-nextcloud-trusted-cacerts
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: nextcloud-aio-nextcloud-trusted-cacerts
|
- name: nextcloud-aio-nextcloud-trusted-cacerts
|
||||||
mountPath: /nextcloud-aio-nextcloud-trusted-cacerts
|
mountPath: /nextcloud-aio-nextcloud-trusted-cacerts
|
||||||
- name: nextcloud-aio-nextcloud-data
|
|
||||||
mountPath: /nextcloud-aio-nextcloud-data
|
|
||||||
- name: nextcloud-aio-nextcloud
|
- name: nextcloud-aio-nextcloud
|
||||||
mountPath: /nextcloud-aio-nextcloud
|
mountPath: /nextcloud-aio-nextcloud
|
||||||
containers:
|
containers:
|
||||||
|
|
|
||||||
|
|
@ -73,8 +73,11 @@ for variable in "${DEPLOYMENTS[@]}"; do
|
||||||
volumeNames="$(grep -A1 mountPath "$variable" | grep -v mountPath | sed 's|.*name: ||' | sed '/^--$/d')"
|
volumeNames="$(grep -A1 mountPath "$variable" | grep -v mountPath | sed 's|.*name: ||' | sed '/^--$/d')"
|
||||||
mapfile -t volumeNames <<< "$volumeNames"
|
mapfile -t volumeNames <<< "$volumeNames"
|
||||||
for volumeName in "${volumeNames[@]}"; do
|
for volumeName in "${volumeNames[@]}"; do
|
||||||
sed -i "/^.*volumeMountsInitContainer:/i\ \ \ \ \ \ \ \ \ \ \ \ - /$volumeName" "$variable"
|
# The Nextcloud container runs as root user and sets the correct permissions automatically for the data-dir if the www-data user cannot write to it
|
||||||
sed -i "/volumeMountsInitContainer:/a\ \ \ \ \ \ \ \ \ \ \ \ - name: $volumeName\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ mountPath: /$volumeName" "$variable"
|
if [ "$volumeName" != "nextcloud-aio-nextcloud-data" ]; then
|
||||||
|
sed -i "/^.*volumeMountsInitContainer:/i\ \ \ \ \ \ \ \ \ \ \ \ - /$volumeName" "$variable"
|
||||||
|
sed -i "/volumeMountsInitContainer:/a\ \ \ \ \ \ \ \ \ \ \ \ - name: $volumeName\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ mountPath: /$volumeName" "$variable"
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
sed -i "s|volumeMountsInitContainer|volumeMounts|" "$variable"
|
sed -i "s|volumeMountsInitContainer|volumeMounts|" "$variable"
|
||||||
if grep -q claimName "$variable"; then
|
if grep -q claimName "$variable"; then
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue