Hi Julien, sorry for the late reply! On Wed, Nov 14, 2012 at 7:15 AM, Julien Cigar <jci...@ulb.ac.be> wrote:
> I'm connecting as user "foo", and "foo" is able to "sudo -u bar" on remote > host. > > with: > env.sudo_user = "bar" > > I'm running: > put(src, dst, use_sudo=True) > > <snip> > > 4) The operation fails with a "Permission denied" wich is logical, as file > is owner by foo:foo and sudo -u bar mv foo dst will never work .. You're not missing anything -- the use_sudo argument to put() is solely a convenience shortcut for a common use case. Your needs don't fit this use case, so using it (as you saw) isn't going to work. Instead, I'd put() to a location both users can read, and then sudo('cp') (vs the implicit sudo('mv') which won't work) -- or whatever's most appropriate to your situation. Best, Jeff -- Jeff Forcier Unix sysadmin; Python/Ruby engineer http://bitprophet.org _______________________________________________ Fab-user mailing list Fab-user@nongnu.org https://lists.nongnu.org/mailman/listinfo/fab-user