How to solve AccessDeniedException in elasticsearch?

I currently have two Mac accounts, one of them is original and the other is just created as admin type

Original account name is = Jack Newly created is = Snooke 

In Jack account, when I type elasticsearch on the terminal my working tone

But when I type elasticsearch on the Snooke terminal, I got this error

 Exception in thread "main" java.lang.IllegalStateException: Failed to created node environment Likely root cause: java.nio.file.AccessDeniedException: /usr/local/var/elasticsearch/elasticsearch_jack/nodes/1 

Does Snooke seem to be trying to access Jack el's search folder?

How to solve this?

0
source share
1 answer

On my Mac users with administrative privileges are the team members. The problem is that elasticsearch writes folders to the data folder with rx rights. Therefore, other members of the group do not have write access to these folders. You can change these permissions for all folders by doing some, for example, chmod -R 775. But I think that with every new folder created you would encounter the same problems.

This problem only exists if you want to continue using data with both accounts. If you just want to use the new account, you can go to the elasticsearch folder and do: (Note the "." At the end)

 chown -R Snooke:staff . 
+2
source

Source: https://habr.com/ru/post/1236803/


All Articles