I have a remote server and wonder what would be the best way for transferring files to the remote server considering that
- SSH is only allowed by one user
- Each dir in /var/www has a specific user as owner.
So I'm looking to rsync but need to specify another command which does the
sudo part. Otherwise I'm getting a permission denied.
$> rsync somefile -e "ssh" user@server:/var/www/whichever.site
Now the 'user' does not own the rights to /var/www, but I want to use that user to enter the server and then perform the sudo.
Obviously if there's another 'best practice' for this scenario I'd like to know that.