Anytime you add or replace structural members, hand railing, or stairs you need a permit. You do not need a permit to replace flooring.