Section 8. No person shall dig up or make an excavation in a public way for the laying, altering or repairing of a drain or sewer without obtaining a written permit from the board or officer having charge of the maintenance and repair of sewers in the town in which such way is situated. Notwithstanding any contrary provision of any local ordinance or by-law, no such permit shall, except in case of an emergency, be approved or issued by said board or officer until copies of the notices to public utility companies required by section forty of chapter eighty-two have been filed with said board or officer by the applicant for such permit. Whoever violates any provision of this section shall be punished by a fine of not more than fifty dollars for the first offense and not less than fifty dollars nor more than one hundred dollars for any subsequent offense.