Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

elasticsearch_plugin installs plugins with the wrong permissions #363

Closed
thomasdziedzic opened this issue Sep 14, 2015 · 2 comments

Comments

Projects
None yet
2 participants
@thomasdziedzic
Copy link
Contributor

commented Sep 14, 2015

I installed shield with:

elasticsearch_plugin 'elasticsearch/shield/latest' do
  plugin_dir plugin_dir
end

but unfortunately the permissions for bin are messed up:

elasticsearch@thomas-elasticsearch02:~$ ls -l bin/
total 328
-rwxr-xr-x 1 elasticsearch elasticsearch   8114 Jul 29 09:56 elasticsearch
...
drwxr-xr-x 2 root          root            4096 Sep 14 18:20 shield
ls -l config/
total 24
-rw-rw-r-- 1 elasticsearch elasticsearch 13476 Jul 16 10:09 elasticsearch.yml
...
drwxr-xr-x 2 root          root           4096 Sep 14 18:20 shield

I think the shellout command runs as root for me instead of elasticsearch:

shell_out!("#{new_resource.bindir}/plugin -install #{name}#{version}#{url}".split(' '))

@martinb3 martinb3 added this to the 1.0.x bugfix release milestone Sep 14, 2015

@thomasdziedzic

This comment has been minimized.

Copy link
Contributor Author

commented Sep 14, 2015

Looks like you need to pass in the user and group like in:
https://github.com/chef/mixlib-shellout

Mixlib::ShellOut.new('command', user: 'user', group: 'group')
@martinb3

This comment has been minimized.

Copy link
Contributor

commented Sep 15, 2015

Hi @thomasdziedzic! Thanks for the bug report. Applying the fix, and after a few other issues, will release in the next day or so. Cheers!

@martinb3 martinb3 closed this in 5f57043 Sep 15, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.