[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fab-user] put with use_sudo=True
From: |
Julien Cigar |
Subject: |
[Fab-user] put with use_sudo=True |
Date: |
Wed, 14 Nov 2012 16:15:35 +0100 |
User-agent: |
Mozilla/5.0 (X11; FreeBSD i386; rv:12.0) Gecko/20120503 Thunderbird/12.0 |
Hello,
I don't understand how the fabric.operations.run() could work with
use_sudo=True.
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)
Fabric does the following on remote host:
1) It creates a temporary file in foo's $HOME (a sha1 file)
2) File is owned by foo:foo
3) Fabric runs something like the following:
Requested: mv "994c72888735e219222f3212ea67c3adbfda2ca0" "/home/foo/dst/src"
Executed: sudo -S -p 'sudo password:' -u "bar" /bin/sh -c "mv
\"994c72888735e219222f3212ea67c3adbfda2ca0\" \"/home/foo/dst/src\""
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 ..
Did I missed something .. ?
My ultimate goal is to be able to deploy without root access.
Thanks,
Julien
--
No trees were killed in the creation of this message.
However, many electrons were terribly inconvenienced.
jcigar.vcf
Description: Vcard
- [Fab-user] put with use_sudo=True,
Julien Cigar <=