Streets, alleys, and sidewalks may be occupied only in connection with the actual erection, repair, alteration, or removal of buildings, and permission for such occupancy shall terminate with the completion of such operation. It shall be unlawful to occupy any sidewalk or street after the completion of such operation for which a permit has been issued by the director of public works. It shall also be unlawful to occupy a sidewalk or street, under authority of such permit, for the storage of materials not intended for immediate use for operations for which such permit has been issued.