Search code examples
elasticsearchpermissionscentospermission-denied

Elasticsearch won't start on centos, permission denied


I installed elasticsearch this way : retrieved the tar.gz on windows, extracted it and put it on a zip uploaded the zip over ssh on a server and use 'unzip file' to unzip it.

I modified the elasticsearch file so that it has this line

export JAVA_HOME = "/home/xxx/project1/jdk1.8.0_73_linux64"

just below

#!/bin/sh

now when I go into /home/xxx/project1/elasticsearch/bin and type

./elasticsearch

I get

-bash: ./elasticsearch: Permission denied

What could I do to get more information about the problem? I'm logged as user xxx

Thanks.


Solution

  • Try to install using the package Yum Install for elasticsearch.

    Else try: Its sounds like the user permission to access the files.

    • Ensure that you have downloaded the linux distribution (Optional) Since you have mentioned its tar.gz.
    • If you have extracted using sudo command then you need to change the user permission for elasticsearch folder to logged in user OR start the elasticsearch using sudo command

    sudo ./elasticsearch -d

    • Check the execution permission if not please do the same by following command

    sudo chmod +x /home/xxx/project1/elasticsearch/bin/elasticsearch.sh

    Try this things if not please create a chat window and invite me.