sudo(machine, "mkdir -p #{sync_dir} && chown -R #{ssh_user}:#{ssh_user} #{sync_dir}")

seems a little cleaner