I am using Capistrano to deploy to a PHP project to a server. I have a user on the server with sudo permissions (using sudo su), however I can not login in as root. How can I make Capistrano change to sudo when logged in so that the folders and files can be chowned to ‘root:www-data’?
The rest of the deployment is running fine, but the ownership is critical. I have previously had root login so this has never been an issue before. Any advice would be much appreciated.
Try this Simons solution :
http://www.simonecarletti.com/blog/2010/07/capistrano-executing-a-command-as-root-without-using-sudo/