title: Capistrano mkdir permission denied
body: <p>When I run <code>cap production deploy</code> I get <code>cannot create directory ‘/var/www/application/repo’: Permission denied</code>.</p>
  
  <p>So far I've created deploy user like:</p>
  
  <pre><code>adduser deploy
  adduser deploy sudo
  </code></pre>
  
  <p>and I use this user in Capistrano.</p>
  
  <p>Indeed, when I log to <code>deploy@my.vps.ip</code> I don't have <code>sudo</code> permission by default, every time  I need to enable it explicitly like <code>sudo su</code>.</p>
  
  <p>I see two possible solutions:  </p>
  
  <ol>
  <li>Enable sudo in Capistrano</li>
  <li>Enable sudo in Ubuntu</li>
  </ol>
  
  <p>Unfortunately I don't know how to do neither of them.</p>