'Permission denied' when running ./opendistro-tar-install.sh during ODFE installation using tarball

Hi everyone,

I am trying to install ODFE using the latest tarball available on the official website.
I followed these steps (Tarball - Open Distro Documentation) up until Step 4. logged into the linux server with my personal login (not root).
When I attempt to run Step 5 (run ./opendistro-tar-install.sh) I was seeing issues such as ‘can not run elastic search as root’.

I then read about creating a new user ‘elasticsearch’ and giving that user ownership so I went ahead and created user ‘elasticsearch’. I wasn’t sure what files to give ‘elasticsearch’ ownership to so I did chown to the ./opendistro-tar-install.sh file itself and then switched user to ‘elasticsearch’ (using command: su elasticsearch’) and tried running ./opendistro-tar-install.sh in the same directory. I am seeing less errors but during processing I’m still seeing ‘Permission denied’ for folders like opendistroforelasticsearch-1.10.1/config/elasticsearch.yml and opendistroforelasticsearch-1.10.1/config/kirk.pem

Am I supposed to also change the ownership of these files to ‘elasticsearch’ using chown command as well? They are currently owned by root.

Please see the following screenshot:

If anyone has experienced this with the tarball installation guide or may have any suggestions in general, please feel free to comment.

Thanks!

Everything should be owned by the ‘elasticsearch’ user.

It’s surprising that you saw the “cannot run elasticsearch as root” message. Which user were you using when you ran “./opendistro-tar-install.sh”? Did you use sudo?

1 Like

Hi camerski!

Thanks for your response! I went back and gave ‘elasticsearch’ ownership to everything in the ODFE directory (using chown -R) and that solved the issue when I ran ./opendistro-tar-install.sh.

Thank you for your help :slight_smile: