# Become (priv escalation) on localhost fails for file content lookup

**URL:** <https://forum.ansible.com/t/become-priv-escalation-on-localhost-fails-for-file-content-lookup/22126>\
**Category:** Ansible Project\
**Created:** [July 26, 2016, 7:15pm UTC](https://forum.ansible.com/t/become-priv-escalation-on-localhost-fails-for-file-content-lookup/22126 "2016-07-26T19:15:58Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Anthony\_Cheng](https://avatars.discourse-cdn.com/v4/letter/a/c57346/32.png) [@Anthony\_Cheng](https://forum.ansible.com/u/Anthony_Cheng)\
**Post date:** [July 26, 2016, 7:15pm UTC](https://forum.ansible.com/t/become-priv-escalation-on-localhost-fails-for-file-content-lookup/22126/1 "2016-07-26T19:15:58Z")

</div>

I think this is a bug ([https://github.com/ansible/ansible/issues/16833](https://github.com/ansible/ansible/issues/16833)) where file lookup doesn’t get sudo permission on localhost even with become=true. In my testing, shell command on localhost requiring sudo works fine with become=true.

---

<div class="post-metadata">

**Author:** ![Brian\_Coca](https://avatars.discourse-cdn.com/v4/letter/b/6de8d8/32.png) [@Brian\_Coca](https://forum.ansible.com/u/Brian_Coca)\
**Post date:** [March 8, 2017, 7:21pm UTC](https://forum.ansible.com/t/become-priv-escalation-on-localhost-fails-for-file-content-lookup/22126/2 "2017-03-08T19:21:11Z")

</div>

lookups are not affected by become, they always execute in the context  
of the user running ansible.
