twilight
(Aatif)
March 28, 2021, 10:47pm
1
Hello,
I just installed elasticsearch 7.12.0 rpm package on AWS Linux AMI, when I try to access the config directory, it says "permission denied".
this is the directory detail.
$ ls -l
drwxr-s--- 3 root elasticsearch 245 Mar 27 21:42 elasticsearch
I need help accessing it via the same or some specific user which I think in this case is 'elasticsearch'.
this command asks for password which I don't know;
$ su elasticsearch
warkolm
(Mark Walkom)
March 29, 2021, 12:02am
2
What directory are you exactly trying to access?
twilight
(Aatif)
March 29, 2021, 12:15am
3
/etc/elasticsearch
I want to access the config file actually.
1 Like
stephenb
(Stephen Brown)
March 29, 2021, 12:28am
4
What command did you use to install?
If you used sudo
to install the package.
Then
sudo vi /etc/elasticsearch/elasticsearch.yml
Of just
sudo -i
Then the commands you want
Example
$ sudo -i
$ cd /etc/elasticsearch
$ vi elasticsearch.yml
1 Like
rijinmp
(Rijin)
March 29, 2021, 2:10pm
5
If you are not created the user elasticsearch , you cant switch user to elasticsearch ( su elasticsearch not possible)
for avoid this permission denied error try this command as root
sudo chown elasticsearch:elasticsearch /etc/elasticsearch
twilight
(Aatif)
March 29, 2021, 9:13pm
6
Thanks, I was able to access the config with sudo {path to yml}.
twilight
(Aatif)
March 29, 2021, 9:14pm
7
Hi Rijin,
Will there be any effect on elasticsearch service or user if I change owner of the directory?
stephenb
(Stephen Brown)
March 29, 2021, 10:39pm
8
The ownerships are set for a reason, so if you change them to something else yes it could have a negative affect.
1 Like
rijinmp
(Rijin)
March 30, 2021, 5:48am
10
In My experience ownership change helped to avoid permission issues .
system
(system)
Closed
April 27, 2021, 5:48am
11
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.