tags:

views:

246

answers:

2

i am trying to do a deployment with capistrano to newly installed Ubuntu server

i am deploying to directory /var/www, owned by root, so i need to set use_sudo to true

while i execute commands with run "#{try_sudo} command" without problem, svn checkout doesn't work with sudo prefix

i try

set :deploy_via, :export

and it throws

Can't make directory '/var/www/pr_name/releases/20091217171253': Permission denied

during checkout

i imagine adding "try_sudo" prefix to "svn export" would help, but where can i edit the one it uses in deploy_via?

--

if on other hand i don't use use_sudo, and set /var/www/ directory ownership to myuser, i still cannot deploy - some of my deployment commands set folders ownership to apache user www-data and then i get something like:

changing ownership of `/var/www/pr_name/current/specificdirectory': Operation not permitted

which, if i understand correctly, has to be done with sudo

A: 

Try cap deploy:setup

Beaks
A: 

using sudo helper solved the problem

Pavel K.