Who can obtain a resident permit