title: When Capistrano3 does mkdir, permission denied
body: <p>When I did <code>bundle exec cap production deploy</code>, i got error messages like <code>mkdir: cannot create directory /usr/share/nginx/www/appname/releases/20131216155457: Permission denied</code></p>
  
  <p>Capistrano3 doesn't have <code>set use_sudo</code> and <code>default_run_options</code>. I read that Passwordless sudo is better, so I did visudo <code>username ALL=NOPASSWD:ALL</code>, but still I got the same errors.</p>
  
  <pre><code>set :application, 'appname.com'
  set :repo_url, 'git@bitbucket.org:user/myapp.git'
  set :user, 'username' 
  set :branch, 'master'
  
  
  set :deploy_to, '/usr/share/nginx/www/appname'
  set :keep_releases, 5
  
  namespace :deploy do
  
   desc 'Restart application'
   task :restart do
     on roles(:app), in: :sequence, wait: 5 do
     end
   end
  
   after :restart, :clear_cache do
     on roles(:web), in: :groups, limit: 3, wait: 10 do
     end
   end
  
   after :finishing, 'deploy:cleanup'
  
  end
  </code></pre>
  
  <p>Does anyone give me any advice around this problem?
  Thank you for your help.</p>