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
Closed

Comments

@thomasdziedzic
Copy link

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:
https://github.com/elastic/cookbook-elasticsearch/blob/ea74370cb9b4444594d09ba5ca4f18be7f628f58/libraries/provider_plugin.rb#L43

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

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
Copy link
Contributor

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants