a career civil servant with an excellent classics degree , he had risen rapidly to the very top , serving en route as a diplomat in washington , and permanent secretary in both the treasury and the foreign office , before heading up the civil service from his present post as cabinet secretary .