Section 20(3) in The Code of Criminal Procedure, 1973
(3)Whenever, in consequence of the office of a District Magistrate becoming vacant, any officer succeeds temporarily to the executive administration of the district, such officer shall, pending the orders of the State Government, exercise all the powers and perform all the duties respectively conferred and imposed by this Code on the District Magistrate.