Section 101. If a town so votes under section twenty-one the selectmen shall appoint a suitable person as chief of the police and fire departments who may be designated as commissioner of public safety. He shall have authority, subject to the approval of the selectmen, to appoint a deputy as chief of the police and one or more deputy chiefs of the fire department. He shall have all the authority of constables and police officers in towns and also the powers and duties of fire engineers, and, subject to the approval of the selectmen, shall fix the compensation of police officers and permanent and call members of the fire department. Such compensation shall not exceed, however, in the aggregate the amount appropriated therefor by the town. The deputy chiefs of the fire department shall under him have the powers of fire engineers relative to the extinguishing of fires in the town and the protection of life and property in case of fire.