fab-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Fab-user] Changing user with sudo and running commands as new user


From: Rahul Menon
Subject: Re: [Fab-user] Changing user with sudo and running commands as new user
Date: Mon, 22 Oct 2012 21:01:58 +0530

Apologies if my reply was not clear, Basically i was suggesting that you could

sudo ('su deployuser -c "cd /my/work/dir; git pull; yourcommand' ) or you should be able to try thing like so

with cd('/my/app/dir')
      run('su deployuser -c "git pull")
print ("Last 5 tags")
run('su deployuser -c "git tag | tail -5")

And so on, as i dont believe session info persists across each 'run' call.

I hope there is better a way to make things persist across sessions. 

Thanks
Rahul

On Mon, Oct 22, 2012 at 9:58 AM, Rahul Menon <address@hidden> wrote:
Herman,

I had a similar situation where i had to use it like that. I ended up having a similar problem but my usecase was not extensive like yours. I ended up using something like "sudo ( 'su www -c ls')". I hope someone out there has a better answer for you. 

Thanks 
--
- Rahul




--
- Rahul


reply via email to

[Prev in Thread] Current Thread [Next in Thread]