docker elasticsearch挂载宿主机报 java.nio.file.AccessDeniedException: /usr/share/elasticsearch/data/nodes

Docker 启动es 宿主机挂载data 跟plugins

启动报错

docker run -d --name es01 -p 9200:9200 -p 9300:9300 -e TZ=Asia/Shanghai -e "discovery.type=single-node"

 -v /home/es/data:/usr/share/elasticsearch/data 

-v /home/es/plugins:/usr/share/elasticsearch/plugins docker.elastic.co/elasticsearch/elasticsearch:7.15.2

AccessDeniedException[/usr/share/elasticsearch/data/nodes]

宿主机 data目录权限不足

chmod 777 /home/es/data

    

你可能感兴趣的:(docker elasticsearch挂载宿主机报 java.nio.file.AccessDeniedException: /usr/share/elasticsearch/data/nodes)