The writer seems a bit confused - possibly American? - as indicated by describing the knighted Sir Walter as "Sir Cowan", and is perhaps also understandably hazy over the difference between being in command of, or "The Commander of" a particularly ship.
An apparent discrepancy over Sir Walter's apparent demotion in WW2 isn't explained. A quick look at Google provided the explanation; apparently, when he "took over" the Commandos he was already a retired full admiral and voluntarily accepted the lower rank of commander in order to do his bit. (he had pulled strings with an old friend, Admiral of the Fleet Sir Roger Keyes, who was then Director of Combined Operations )
None of the slightly confused writing should detract from the actions of Sir Walter. I'm a bit surprised that his story hasn't been translated into the cinema. What a character.