I'm using docker image of elasticsearch:6.4.0 and trying to add a repo path for backup.
But after I add mounted a named volume, the permission in the cluster containers is not owned by elasticsearch but root.
Here is the code snippet of my yaml file:
data: image: elasticsearch:6.4.0 configs: - source: es-data target: /usr/share/elasticsearch/config/elasticsearch.yml - source: jvm-options-data target: /usr/share/elasticsearch/config/jvm.options networks: - esnet volumes: - esdata:/usr/share/elasticsearch/data - backup:/usr/share/elasticsearch/backup volumes: esdata: backup:
If I check the container, data folder is owned by elasticsearch but not backup folder.
drwxr-xr-x 2 root root 4096 Dec 16 09:24 backup drwxrwxr-x 3 elasticsearch root 4096 Mar 12 2019 data
Is there any step I missed?