I wouldn’t ASK for permission....sheesh....of course, at different ports of call having a “gun” is probably a crime....so, I would not go THERE! (Or I’d have the piece hidden on my body)
If you don't declare weapons AND you are caught, the boat, the weapon may be confiscated and jail time is a high probability. The only option is if you have them declare them and turn them in to the country.
My solution, don't go there if they won't let you keep them secure on board.