USS KG5 wrote:
A similar situation arises in The Arsenal of Freedom. Geordi is put in command while Picard and Riker are on the planet. Chief Engineer Logan tries to pull rank and assume command, but Geordi basically tells him to eff off.
Indeed, Starfleet seems to put a lot of store by position, and rank seems to actually have very little relevance at all.
This is especially true in Voyager, where Ensign Harry Kim is treated as far more senior than dozens of Lt. Cmdr. ranks walking around the ship. I always found that a bit daft.
Also equally silly seems the fact every commander of a ship, no matter what size or capability, holds the rank of full Captain. In the real military the idea that the commander of a Minesweeper would hold a higher rank than the XO of an aircraft carrier would be mental. One commands 20 guys, one essentially commands 5,000.
It does make some in-universe sense though. Starfleet seems to have a relaxed approach to rank compared to a modern military as suits its sometimes quasi-military portrayal. Terefore Data deferring to Geordi in Engineering is as much about Geordi knowing his stuff and Data's respect for that as it is about Geordi's actual position.
In a crunch, where they disagree, Data's rank would give him the call, but when there is no crunch - it is likely they would all sit and have a meeting, as they regularly did in TNG.
I believe that the practice of addressing the CO of any naval vessel, regardless of rank, as "Captain" is more of a naval tradition than an actual commissioned rank. For example, In WW2 CO's of US Navy submarines were Lieutenant Commanders by rank, but they were called "Captain" by their crews. John F. Kennedy was a Lieutenant when in command of PT-109 but he was referred to as the "captain" of the ship.
In regards to Geordi, I seem to remember the following exchange from "Deja Q"...
Q (about Geordi): "Who does he believe he is?"
Data: "He believes he is in charge here, and he is correct."
I'm pretty sure that Riker and Picard were the only ones who normally could give Geordi an order once he became Chief Engineer. The only exception would be when they were both off the ship and placed Data, or someone else, in temporary command. Whoever's in command, is in command - which is why Geordi was able to tell off Logan in "Arsenal of Freedom".
Rank isn't the only thing that determines who is in charge of any given situation, it's also the position one is in. A Second Officer can't give the Chief Engineer an order, unless said Second Officer is acting as temporary Captain.