# Error after deployment: "-su: /dev/null: Permission denied"

**URL:** <https://forum.ansible.com/t/error-after-deployment-su-dev-null-permission-denied/14479>\
**Category:** Ansible Project\
**Created:** [February 3, 2014, 10:55pm UTC](https://forum.ansible.com/t/error-after-deployment-su-dev-null-permission-denied/14479 "2014-02-03T22:55:31Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dan\_CaJacob](https://avatars.discourse-cdn.com/v4/letter/d/e68b1a/32.png) [@Dan\_CaJacob](https://forum.ansible.com/u/Dan_CaJacob)\
**Post date:** [February 3, 2014, 10:55pm UTC](https://forum.ansible.com/t/error-after-deployment-su-dev-null-permission-denied/14479/1 "2014-02-03T22:55:31Z")

</div>

I recently got some errors on the end nodes I was deploying to. Error is: “-su: /dev/null: Permission denied”, which in general seems to be recoverable after a reboot. It looks like the /dev/null file is just deleted somehow. Has anyone else seen this? Very weird.

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan1](https://avatars.discourse-cdn.com/v4/letter/m/5e9695/32.png) [@Michael\_DeHaan1](https://forum.ansible.com/u/Michael_DeHaan1)\
**Post date:** [February 3, 2014, 10:56pm UTC](https://forum.ansible.com/t/error-after-deployment-su-dev-null-permission-denied/14479/2 "2014-02-03T22:56:31Z")

</div>

Can you please share the relevant command lines and playbook snippets that got you there? (Also can we see the output in the context of the run?)

Ansible version?

I see su, so I’m not sure if you are using the new 1.5 su keyword or are running su instead the playbook, etc.

Thanks!

---

<div class="post-metadata">

**Author:** ![Dan\_CaJacob](https://avatars.discourse-cdn.com/v4/letter/d/e68b1a/32.png) [@Dan\_CaJacob](https://forum.ansible.com/u/Dan_CaJacob)\
**Post date:** [February 3, 2014, 11:08pm UTC](https://forum.ansible.com/t/error-after-deployment-su-dev-null-permission-denied/14479/3 "2014-02-03T23:08:26Z")

</div>

> Can you please share the relevant command lines and playbook snippets that  
> got you there?

It's a pretty big role-based system. Can I share it with you privately?

(Also can we see the output in the context of the run?)

> 

I don't think I have it, unfortunately. It happened several times, but not  
always. Never had this problem before with the same system. I kind of  
wonder if it correlates with me CTRL-C exiting the ansible-playbook run...

> Ansible version?

Not sure exactly. I have recently upgraded to 1.4.4 via pip. But I was  
running maybe 1.2.3 before that (like a day ago). Unfortunately I am not  
sure if I got the problem on one or the other or both.

I can try deploying to a local node tonight to see if I can recreate the  
problem.

> I see su, so I'm not sure if you are using the new 1.5 su keyword or are  
> running su instead the playbook, etc.

I don't think I use su anywhere explicitly (shelled out), but my roles do  
sometimes change user.

---

<div class="post-metadata">

**Author:** ![Dan\_CaJacob](https://avatars.discourse-cdn.com/v4/letter/d/e68b1a/32.png) [@Dan\_CaJacob](https://forum.ansible.com/u/Dan_CaJacob)\
**Post date:** [February 4, 2014, 6:34am UTC](https://forum.ansible.com/t/error-after-deployment-su-dev-null-permission-denied/14479/4 "2014-02-04T06:34:47Z")

</div>

This turned out to be a script error, where I was rm’ing a file that occassionally is /dev/null Ansible was in no way responsible. Sorry for the false alarm and thanks for the awesome software!
