fix chmod and chown bug (ignore lib folder)