Can the president fire the FBI director?

President Donald Trump has fired FBI Director James Comey.