Towns shall, within their respective limits, build and repair all necessary highways and bridges, and all highways to ferries as far as the low water mark of the waters over which the ferries pass, except when such duty belongs to some particular person. Any town, at its annual meeting, may provide for the repair of its highways for periods not exceeding five years and, if any town fails to so provide at such meeting, the selectmen may provide for such repairs for a period not exceeding one year.