since, as far as I understand, you have to do it manually, which installation use the user to log in to, and not to set the rights to the directory.
I did not find the group settings for capistrano, maybe you used several extensions for this?
What you could do to change this is:
after "deploy:setup", :setup_group task :setup_group do run "chown -R :#{group} #{deploy_to} && chmod -R g+s #{deploy_to}" end
But first of all, you should not use root for deployment, as @Julian mentions in a comment. Best practice is to use an individual user for this task and set your group to the desired group, then it will not require the above task and will work automatically.
source share