Sorry I got confused there: it has nothing to do with Capistrano 2.5.5
vs 2.5.8.

The fix was actually to use the command:

run "#{sudo} chown ..."

instead of:

sudo "chown ..."

However, Jamis advised in multiple posts to use the sudo helper and it
makes sense to me. So, I'd rather use sudo "chown ..."

I thought I had found a better fix:

http://stackoverflow.com/questions/431925/capistrano-is-hanging-when-prompting-for-sudo-password-to-an-ubuntu-box

But when I tried to add:

default_run_options[:pty] = true

and use the sudo helper, the problem unfortunately re-appeared...

Anyone knows a better fix for this password prompt problem?

Cyrille



On Aug 19, 9:51 am, Cyrille <[email protected]> wrote:
> Hi there,
>
> I've found the source of my problems. It is Capistrano 2.5.8.
>
> The problem: Capistrano 2.5.8 is prompting for the sudo password at
> the command line.
>
> The fix: revert to Capistrano 2.5.5!
>
> As a reminder, this is the command I use:
>
> sudo "chown -R #{apache_user} #{release_path}"
>
> My server runs Ubuntu.
>
> I looked at the release notes for Capistrano 2.5.7 and 2.5.8 and I
> can't see anything related to sudo...
>
> My problem is solved, but is there a bug or a new *feature* in
> Capistrano 2.5.8??
>
> Cyrille
>
> On Aug 18, 4:34 pm, Cyrille <[email protected]> wrote:
>
> > Hi guys,
>
> > My deployment works fine from my local machine, but fails from a
> > different machine (under a different user).
>
> > It fails on the first task that uses sudo. Here is the task:
>
> >   task :after_symlink do
> >     sudo "chown -R #{apache_user} #{release_path}"
> >   end
>
> > And the error is:
>
> > Password: stty: standard input: Inappropriate ioctl for device
>
> > The key difference (I think) is that the deployment runs under the
> > Apache user (I use Integrity).
>
> > Something must be wrong with the stdin for that user, but I can't
> > quite put my finger on it and I have a low Google fu today...
>
> > Suggestions and hints welcome!
>
> > Cheers
>
> > Cyrille
>
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Capistrano" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.co.uk/group/capistrano?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to