Can't launch Elasticsearch


I am very happy using Elasticsearch and are trying to upgrade from 1.2.1 to 6.3.2.

I have downloaded 6.3.2 and set java to 1.8.0, see:

$ java -version
java version "1.8.0_181"
Java(TM) SE Runtime Environment (build 1.8.0_181-b13)
Java HotSpot(TM) Server VM (build 25.181-b13, mixed mode)

When I try to launch Elasticsearch I get a java.nio.file.AccessDeniedException.

I know it has to do with file or folder permissions, I just don't know which file or folder's permission to edit. Does anyone have pointers for solving this?

This is the output I get:

[dgam@vps-... srv]$ cd elasticsearch-6.3.2
[dgam@vps-... elasticsearch-6.3.2]$ bin/elasticsearch -d
Exception in thread "main" java.nio.file.AccessDeniedException: /srv/elasticsearch-6.3.2/config/jvm.options
at sun.nio.fs.UnixException.translateToIOException(
at sun.nio.fs.UnixException.rethrowAsIOException(
at sun.nio.fs.UnixException.rethrowAsIOException(
at sun.nio.fs.UnixFileSystemProvider.newByteChannel(
at java.nio.file.Files.newByteChannel(
at java.nio.file.Files.newByteChannel(
at java.nio.file.spi.FileSystemProvider.newInputStream(
at java.nio.file.Files.newInputStream(

Many thanks,


This is basically file permission issues and it is not an issue with Elasticsearch.

It seems that you are using a user named dgam. You need to make sure that this user has full read/write permissions to this Elasticsearch directory.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.