What are the rules to obtain a building permit?