本文主要是介绍java.nio.file.FileSystemException: /usr/share/elasticsearch/data/nodes: Operation not permitted,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
问题原因:宿主中 /usr/share/elasticsearch/data/nodes
没有操作权限,对应的主机/opt/workspace/work/es/single
没有操作权限
docker run -e ES_JAVA_OPTS="-Xms256m -Xmx256m" \
-d -p 9200:9200 -p 9300:9300 \
-v /opt/workspace/work/es/single/config/es-single.yml:/usr/share/elasticsearch/config/elasticsearch.yml \
-v /opt/workspace/work/es/single/data:/usr/share/elasticsearch/data \
--name st_es elasticsearch:7.14.2
查看问题文件
➜ ~ cd /opt/workspace/work/es/single
➜ single ls -al
total 0
drwxr-xr-x 4 root wheel 128 10 18 09:07 .
drwxr-xr-x 3 root wheel 96 10 18 09:06 ..
drwxr-xr-x 3 root wheel 96 10 18 09:09 config
drwxr-xr-x 2 root wheel 64 10 18 09:07 data
修改权限:
➜ single sudo chmod -R 777 config
Password:
➜ single sudo chmod -R 777 data
➜ single ls -al
total 0
drwxr-xr-x 4 root wheel 128 10 18 09:07 .
drwxr-xr-x 3 root wheel 96 10 18 09:06 ..
drwxrwxrwx 3 root wheel 96 10 18 09:09 config
drwxrwxrwx 2 root wheel 64 10 18 09:07 data
这篇关于java.nio.file.FileSystemException: /usr/share/elasticsearch/data/nodes: Operation not permitted的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!