logo       

Re: cap 2 - cap deploy:setup not using sudo?: msg#00108

lang.ruby.capistrano.general

Subject: Re: cap 2 - cap deploy:setup not using sudo?


Just dug into the code. setup uses 'run' instead of
'invoke_command'. After looking through the other deploy tasks, most
things don't use invoke command. I suppose I'll just change the
'deploy_to' location for now, but wouldn't it make sense that you'd
want to deploy the app into a system level location that would require
sudo rights and chmod it so the user has access?

Alex


On Nov 16, 1:26 pm, Alex Soto <aps...-Re5JQEeQqe8AvxtiuMwx3w@xxxxxxxxxxxxxxxx>
wrote:
> Hey there,
>
> I'm setting up cap for the first time. I'm doing it against a server
> I control. When I run cap deploy:setup I see it attempting the
> commands but it's failing due to permissions. It doesn't seem to use
> sudo.
>
> * I have the user setup in sudoers with NOPASSWD
> * I've set the following in deploy.rb
> default_run_options[:pty] = true (suggestion from another post,
> but likely a cap 1.0 solution)
> set :use_sudo, true (even though it should default to true)
>
> This is the output: (snipped a little bit)
> * executing `deploy:setup'
> * executing "umask 02 && mkdir -p /var/www/myapp /var/www/myapp/
> releases /var/www/myapp/shared /var/www/myapp/shared/system /var/www/
> myapp/shared/log /var/www/myapp/shared/pids"
> servers: ["pref"]
> [pref] executing command
> ** [out :: pref] mkdir: cannot create directory `/var/www/myapp':
> Permission denied
> ** [out :: pref] mkdir: cannot create directory `/var/www/myapp':
> Permission denied
> ** [out :: pref] mkdir: cannot create directory `/var/www/myapp':
> Permission denied
> ** [out :: pref] mkdir: cannot create directory `/var/www/myapp':
> Permission denied
> ** [out :: pref] mkdir: cannot create directory `/var/www/myapp':
> Permission denied
> ** [out :: pref] mkdir: cannot create directory `/var/www/myapp':
> Permission denied
> command finished
> command "umask 02 && mkdir -p /var/www/myapp /var/www/myapp/releases /
> var/www/myapp/shared /var/www/myapp/shared/system /var/www/myapp/
> shared/log /var/www/myapp/shared/pids" failed on pref
>
> Thanks for any help,
>
> Alex


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise