I think this varies by branch of service, and housing situation. I'm Active Duty Air Force, I live in base housing, and my firearms live with me. The dormitories prohibit weapons, so Airmen who live in the dorms gotta check their guns at the armory, but folks who live in regular old housing can store their own. Our BX even has a gun counter where you can purchase guns (no sales tax, bonus!)if someone were to pcs to the base the base armory would have to store the weapons until the member got the paperwork signed by his commander. Should someone be denied the ability to store their weapons on base while residing on base I would bet they could get it ruled as an unlawful order as it is unduly restricting your freedoms and the person issuing the order doesn't have the authority to do so (though it would likely be a long fight similar to the recent fight about commanders who required off base people to register their guns on base. Congress stepped in and said that was unlawful for commanders to do). Yes there are gun buster signs at the gates, but they can't stop residents of the base from bringing their lawfully owned weapons onto it.
When I pcsed to my current base I had the cops called on me by a moron when I was asking questions about the gun policy (she told the cops I had a gun illegally on base). It's DOD policy that governs it all and even a lot of cops don't fully know it, so I wouldn't be surprised if your base had an improper policy in effect, but from what the cops told me the base has to allow or supply storage of firearms for those that live on the base (including those that are in the base hotel due to a pcs, though these don't require the paperwork to be signed by the commander, only permanently stored weapons require the commander's signature).
As far as a permit to carry guns on base, there is no such thing as far as I know. I can keep the guns in my house however I see fit (loaded or unloaded), however I cannot carry a loaded weapon on base. If I'm going off base somewhere and decide to take my pistol OC or CC I have to unload it, and keep the gun and ammo separate until I'm off base, then pull into a parking lot (usually McDees) and load/holster it. Upon returning to the base I have to unload/separate gun and ammo again prior to passing through the gate.
Pain in the rear, but it gets the job done.