> On Mon, Apr 20, 2009 at 9:55 AM, Nick Hoffman <[email protected]> wrote:
> > G'day guys. When I run "cap staging deploy:setup", the setup task
> > tries to chmod the "deploy_to" directory:
> >    chmod g+w /var/www/beta.example.com/statusblog
>
> > However:
> > 1) That directory has the correct permissions (0775);
> > 2) I don't have sufficient privileges to change the permissions.
>
> > How can I prevent Capistrano from trying to chmod the "deploy_to"
> > directory?

On Apr 20, 7:18 pm, Sarah Mei <[email protected]> wrote:
> The easiest way is probably to define your own deploy:setup task in
> your deploy.rb, by copying the default task in
> lib/capistrano/recipes/deploy.rb and modifying as necessary. Something
> like:
>
> namespace :deploy do
>   task :setup, :except => { :no_release => true } do
>     dirs = [deploy_to, releases_path, shared_path]
>     dirs += shared_children.map { |d| File.join(shared_path, d) }
>     run "#{try_sudo} mkdir -p #{dirs.join(' ')} && #{try_sudo} chmod
> g+w #{dirs.delete(deploy_to).join(' ')}"
>   end
> end

That's what I was thinking too, Sarah. It's a brittle solution, but
the only one I've come up with so far.

Thanks for your advice!
-Nick
--~--~---------~--~----~------------~-------~--~----~
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