Chief Engineer
On starships or starbases, the chief engineering officer (often shortened to Chief Engineer) is in charge of all engineers and engineering duties.
The chief engineer's duties range from making the duty shift roster for engineering personnel to advising the captain on possible solutions for certain technical problems. In general the chief engineer is an officer with enough experience in his or her own field of expertise and with seniority over the rest of the engineers. A chief engineer is also a member of the senior staff and accountable for the overall performance of the vessel.
In the context of engineering, the chief engineer may be seen giving orders to persons who would ordinarily outrank him in other contexts, e.g., the second officer. For example, Data regularly takes orders from Geordi La Forge in engineering contexts, even though as the second officer Data outranks Geordi in absolute terms. (TNG)
The captain of a Starfleet starship has the prerogative to appoint someone to the post of chief engineer even if he or she does not have the seniority which normally would apply to this function. Persons with vast experience and engineering knowledge but no appropriate Starfleet rank could be appointed as chief engineer in this manner. (VOY|Parallax)