Hey There,

So I have an issue with sudo and cd.  The current IT setup at my work
requires that all production files be deployed as the user 'deploy'.
I set the sudo user:

set :sudo, "sudo -u deploy"

This works fine and all my files are able to be deployed.  However the
next issue I have is that I have to start a backgroundrb server and it
has to be started in the current directory of my application or else
some of our special logging does not work.  So essentially I want to
run the follow commands via capistrano:

cd /path/to/my/app/current
sudo -u deploy ruby script/backgroundrb start

I've tried just doing:

sudo "sh -c 'cd #{current_path} && ruby script/backgroundrb start'"

However since capistrano logs into my home directory, the deploy user
does not have permission for the directory so the cd command fails.
Rather than start messing with permissions is there a way to either
change the default directory capistrano logs into, or use a run block
and execute the sudo command inside the run block?

Orion
--~--~---------~--~----~------------~-------~--~----~
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/capistrano
-~----------~----~----~----~------~----~------~--~---

Reply via email to