Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions services/pelias/init_elastic.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ set -o pipefail

function extract_elastic() {
# hardcoded in elasticsearch Dockerfile
local elasticsearch_user=1000
local elasticsearch_group=1000

local extract_dir=/tmp/elasticsearch.extract
Expand All @@ -18,6 +19,9 @@ function extract_elastic() {

rm -fr /usr/share/elasticsearch/data/*
mv "${extract_dir}"/* /usr/share/elasticsearch/data

chown -R "$elasticsearch_user:$elasticsearch_group" /usr/share/elasticsearch/data
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's already been chgrp'd with the same permissions right, so why do we need this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unless there's some other similar edge-case going on here, I think it's this podman bug: containers/podman#27720

Copy link
Contributor Author

@3nprob 3nprob Dec 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note also that the existing chgrp only affects the contents of /usr/share/elasticsearch/data but not the dir itself as it already exists and is not deleted/modified here. elasticsearch expects permission on the dir itself.

chmod -R 'g+rwX' /usr/share/elasticsearch/data
}

if [ ! -z "$(find /usr/share/elasticsearch/data -type f)" ]; then
Expand Down