“You need a permit in Massachusetts before you can even buy a hand gun?”
In NC you have needed a handgun purchase permit, or a concealed gun permit, for any handgun transfer of any kind, since about 1995.
Since I don’t yet have a concealed handgun permit, I have to go to the Sheriff for a handgun purchase permit, to buy a handgun.
Ditto Michigan since the 1970s. We did recently update our handgun purchase law so that you no longer need a purchase permit if you buy from an FFL, you just need to turn in the registration slip after the purchase. (Yes, Michigan also registers all handguns.)
If you buy a handgun face to face from an individual, and you do not have a CPL, then you still need to acquire a purchase permit from the police ahead of time.