Such corporation, after having first obtained permission from the governing authorities thereof, is invested with the privilege of extending and placing its conductors, pipes, and pipelines along, through, or upon all or any of the streets, lanes, and alleys of the cities, towns, and villages in which it may operate, and in, through, and along any and all of the roads, and public highways of the counties, and of erecting hydrants and fire plugs at suitable places along the streets, lanes, alleys, roads, and public highways for the purpose of supplying water to the inhabitants thereof for manufacturing, domestic, or sanitary or other purposes, and for such purposes it may make any and all necessary excavations in and along the same after first obtaining permission from the governing authorities of the incorporated cities, towns, and villages, and when outside of any incorporated towns, of the governing authority of the county in which same is located; but all excavations shall be made in such manner as to give the least inconvenience to the public, and shall be replaced with all possible speed by and at the expense of the corporation in as substantial manner as found before being excavated.