Hi guys, sorry for getting back to you so late.

I first ended up doing creating a method for doing su'ing:

def su(command, user):
  sudo("su %s -s /bin/bash -c %s", command, user)

But, figured I could just use the sudo(command, user=USER_ID), which
in my opinion is the simplest (and correct) aproach in this situation.
Where USER_ID is the system user running apache or whatever (e.g.
www-data).

Final code ended up like this (this is without tunnelling, which we
are dropping until fabric 1.5):
https://gist.github.com/3972599
So far running great.

Thanks for your time and feedback, Jeff and Rahul.

Sincerly, Herman Schistad

_______________________________________________
Fab-user mailing list
Fab-user@nongnu.org
https://lists.nongnu.org/mailman/listinfo/fab-user

Reply via email to