From e68a79180f12b82c0e7828b7b75d643fc5216792 Mon Sep 17 00:00:00 2001 From: Ian Roberts Date: Mon, 17 Feb 2025 13:26:55 +0000 Subject: [PATCH] [bitnami/elasticsearch] do not fail if asked to chown read-only files Added "|| true" to chown commands so they do not cause the container startup to fail if any of the target folders or their subdirectories are mounted from a read-only filesystem Signed-off-by: Ian Roberts --- .../debian-12/rootfs/opt/bitnami/scripts/libelasticsearch.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bitnami/elasticsearch/9/debian-12/rootfs/opt/bitnami/scripts/libelasticsearch.sh b/bitnami/elasticsearch/9/debian-12/rootfs/opt/bitnami/scripts/libelasticsearch.sh index ad5bf51b13604..4c847e0a87f95 100644 --- a/bitnami/elasticsearch/9/debian-12/rootfs/opt/bitnami/scripts/libelasticsearch.sh +++ b/bitnami/elasticsearch/9/debian-12/rootfs/opt/bitnami/scripts/libelasticsearch.sh @@ -379,7 +379,7 @@ elasticsearch_validate() { am_i_root && ensure_user_exists "$DB_DAEMON_USER" --group "$DB_DAEMON_GROUP" for dir in "$DB_TMP_DIR" "$DB_LOGS_DIR" "$DB_PLUGINS_DIR" "$DB_BASE_DIR/modules" "$DB_CONF_DIR"; do ensure_dir_exists "$dir" - am_i_root && chown -R "$DB_DAEMON_USER:$DB_DAEMON_GROUP" "$dir" + am_i_root && chown -R "$DB_DAEMON_USER:$DB_DAEMON_GROUP" "$dir" || true done debug "Validating settings in DB_* env vars..." @@ -686,7 +686,7 @@ elasticsearch_initialize() { debug "Ensuring expected directories/files exist..." for dir in "$DB_TMP_DIR" "$DB_LOGS_DIR" "$DB_PLUGINS_DIR" "$DB_BASE_DIR/modules" "$DB_CONF_DIR"; do ensure_dir_exists "$dir" - am_i_root && chown -R "$DB_DAEMON_USER:$DB_DAEMON_GROUP" "$dir" + am_i_root && chown -R "$DB_DAEMON_USER:$DB_DAEMON_GROUP" "$dir" || true done for dir in "${data_dirs_list[@]}"; do ensure_dir_exists "$dir"