# Yum Module - EL6 Systems Permission denied

**URL:** <https://forum.ansible.com/t/yum-module-el6-systems-permission-denied/24125>\
**Category:** Ansible Developer\
**Created:** [April 3, 2017, 8:48am UTC](https://forum.ansible.com/t/yum-module-el6-systems-permission-denied/24125 "2017-04-03T08:48:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Martin\_Urbach](https://avatars.discourse-cdn.com/v4/letter/m/48db29/32.png) [@Martin\_Urbach](https://forum.ansible.com/u/Martin_Urbach)\
**Post date:** [April 3, 2017, 8:48am UTC](https://forum.ansible.com/t/yum-module-el6-systems-permission-denied/24125/1 "2017-04-03T08:48:01Z")

</div>

HI all!

I try to install some packages via the Ansible yum Module on CentOS 6 (python --version  
Python 2.6.6) systems but I getting the following error:

I’ve started the Module-Script with root - permission  
/dev/shm/ansible-tmp-root/ansible-tmp-1491206776.36-130095664290190/yum.py

#error message

{“msg”: “[Errno 13] Permission denied”, “failed”: true, “cmd”: “/etc/rpm -q --qf ‘%{name}-%{version}-%{release}.%{arch}’ libselinux-python”, “rc”: 13, “invocation”: {“module\_args”: {“name”: [“libselinux-python”, “ntp”], “list”: null, “disable\_gpg\_check”: false, “conf\_file”: null, “install\_repoquery”: true, “state”: “installed”, “disablerepo”: null, “update\_cache”: false, “enablerepo”: null, “exclude”: null, “validate\_certs”: true}}}

On my CentOS7 systems works the same very well.

Any Ideas?

Thanks in advance

Martin

---

<div class="post-metadata">

**Author:** ![alikins](https://avatars.discourse-cdn.com/v4/letter/a/d07c76/32.png) [@alikins](https://forum.ansible.com/u/alikins)\
**Post date:** [April 3, 2017, 2:03pm UTC](https://forum.ansible.com/t/yum-module-el6-systems-permission-denied/24125/2 "2017-04-03T14:03:54Z")

</div>

I'm guessing the system doesnt have 'repoquery' installed, and that is  
potentially causing the plugin to lookup where rpm lives and for  
whatever reason it is deciding rpm executable lives in /etc/rpm.

ie the result of  
[https://github.com/ansible/ansible/blob/devel/lib/ansible/modules/packaging/os/yum.py#L351](https://github.com/ansible/ansible/blob/devel/lib/ansible/modules/packaging/os/yum.py#L351)  
is setting rpmbin='/etc/rpm'

No idea why it would find /etc/rpm though.

is '/etc' in PATH?

I do see what is almost surely a bug in  
module\_utils.basic.get\_bin\_path() though. It sets a default default  
arg to a mutable , which can cause unexpected behavior. But I dont  
see any thing in particular that seems like it would cause the bug.
