In quite a few countries where weapons are heavily regulated, you can get a permit. The structure obviously depends on the country, but if you have a genuine reason (mostly hunting or sport) and satisfy some basic requirements (no criminal record, mentally sane, etc), getting a reasonable weapon is possible.