Skip to content

explicitly set ownership on elasticsearch data volume for podman compat#405

Open
3nprob wants to merge 1 commit intoheadwaymaps:mainfrom
3nprob:elasticsearch-volume-ownership
Open

explicitly set ownership on elasticsearch data volume for podman compat#405
3nprob wants to merge 1 commit intoheadwaymaps:mainfrom
3nprob:elasticsearch-volume-ownership

Conversation

@3nprob
Copy link
Contributor

@3nprob 3nprob commented Dec 10, 2025

When running the docker-compose stack using podman, the elasticsearch container crashloops due to lacking permissions on /usr/share/elasticsearch/data.

As workaround, running podman exec -it -u0 headway-pelias-elasticsearch-1 chown 1000:1000 /usr/share/elasticsearch/data fixes this and makes everything run fine.

containers/podman#27720

@3nprob 3nprob marked this pull request as ready for review December 10, 2025 23:59
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.

@3nprob 3nprob force-pushed the elasticsearch-volume-ownership branch from ffb1296 to 339c7dc Compare December 12, 2025 04:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants