mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2026-04-07 02:31:27 -07:00
Storage permission fix
This commit is contained in:
@@ -51,12 +51,13 @@ if [ "$(id -u)" -eq 0 ]; then
|
|||||||
EOF
|
EOF
|
||||||
>&2 printf "%s" "${RESET}"
|
>&2 printf "%s" "${RESET}"
|
||||||
|
|
||||||
# Set ownership to netalertx user for all read-write paths
|
# Set ownership and permissions for each read-write path individually
|
||||||
chown -R netalertx "${READ_WRITE_PATHS}" 2>/dev/null || true
|
printf '%s\n' "${READ_WRITE_PATHS}" | while IFS= read -r path; do
|
||||||
|
[ -n "${path}" ] || continue
|
||||||
# Set directory and file permissions for all read-write paths
|
chown -R netalertx "${path}" 2>/dev/null || true
|
||||||
find "${READ_WRITE_PATHS}" -type d -exec chmod u+rwx {} \;
|
find "${path}" -type d -exec chmod u+rwx {} \;
|
||||||
find "${READ_WRITE_PATHS}" -type f -exec chmod u+rw {} \;
|
find "${path}" -type f -exec chmod u+rw {} \;
|
||||||
|
done
|
||||||
echo Permissions fixed for read-write paths. Please restart the container as user 20211.
|
echo Permissions fixed for read-write paths. Please restart the container as user 20211.
|
||||||
sleep infinity & wait $!
|
sleep infinity & wait $!
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user