The commander of a Navy destroyer that's helping protect the San Diego-based aircraft carrier USS Theodore Roosevelt in the Middle East has been relieved of duty about four months after he was seen in a photo firing a rifle with a scope mounted backward.