# Shell Permission denied

**URL:** <https://forum.ansible.com/t/shell-permission-denied/19583>\
**Category:** Ansible Project\
**Created:** [October 21, 2015, 11:11pm UTC](https://forum.ansible.com/t/shell-permission-denied/19583 "2015-10-21T23:11:02Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![gfurg11](https://avatars.discourse-cdn.com/v4/letter/g/8e8cbc/32.png) [@gfurg11](https://forum.ansible.com/u/gfurg11)\
**Post date:** [October 21, 2015, 11:11pm UTC](https://forum.ansible.com/t/shell-permission-denied/19583/1 "2015-10-21T23:11:02Z")

</div>

A simple task of listing/removing/installing a ElasticSearch plugin has got me baffled! What am I missing here?

Here’s my playbook:

---

<div class="post-metadata">

**Author:** ![Greg\_Bell](https://avatars.discourse-cdn.com/v4/letter/g/bcef8e/32.png) [@Greg\_Bell](https://forum.ansible.com/u/Greg_Bell)\
**Post date:** [October 21, 2015, 11:54pm UTC](https://forum.ansible.com/t/shell-permission-denied/19583/2 "2015-10-21T23:54:14Z")

</div>

My OCD is noticing that Ansible’s running --list, but you use -l from the command line. Of course no difference, right?

I don’t know what the problem is, but maybe it’s not becoming root? Can you shell:whoami?

---

<div class="post-metadata">

**Author:** ![gfurg11](https://avatars.discourse-cdn.com/v4/letter/g/8e8cbc/32.png) [@gfurg11](https://forum.ansible.com/u/gfurg11)\
**Post date:** [October 22, 2015, 12:30am UTC](https://forum.ansible.com/t/shell-permission-denied/19583/3 "2015-10-22T00:30:31Z")

</div>

shell: whoami is returning root. But root access isn’t required to run that script from the command line.

changed: [esserver] =\> {“changed”: true, “cmd”: “whoami”, “delta”: “0:00:00.014084”, “end”: “2015-10-21 20:28:46.975832”, “rc”: 0, “start”: “2015-10-21 20:28:46.961748”, “stderr”: “”, “stdout”: “root”, “warnings”: }

---

<div class="post-metadata">

**Author:** ![gfurg11](https://avatars.discourse-cdn.com/v4/letter/g/8e8cbc/32.png) [@gfurg11](https://forum.ansible.com/u/gfurg11)\
**Post date:** [October 22, 2015, 1:28am UTC](https://forum.ansible.com/t/shell-permission-denied/19583/4 "2015-10-22T01:28:19Z")

</div>

It appears to be something that the /usr/share/elasticsearch/bin/plugin script is trying to do with the older version of ES(1.5.3) that I’m trying to run this command on. Updated ES to 1.7.1 and my Ansible shell stuff is working fine.
