Ever military instatllation has rules on what can be photographed. General rule is the if you took a photograph, the image is yours to do with it as you please.
Check with local base as well as unit PAO/MC on their policy and rules of the road. I run into entirely different rules when at Pax vs Fallon vs Nellis vs Oceana vs Dam Neck/Little Creek vs afloat. Always best to establish rapport with the local PAO shop. It pays off in long run especially if you get challenged, which happens everywhere on Air Force bases, but not so much on Navy installations (I've been challenged twice in 40+ years on Navy and Marine bases, and at least 10 times in one visit on Nellis ramp
with an escort in tow because that's how they roll), but not at all at Creech an hour later.
In the past, the Photomate rules held that if you take while on active duty during working hours, it "belonged" to the Navy. This was challenged and became somewhat controversial when they went after "Heater" Heatley after he published
The Cutting Edge in the mid 80s. "Heater" maintained the images were taken by him with his own camera. Since many were air-to-air taken on missions he flew, the Photo Community said they belonged to the Navy and threatened to charge him for the cost of the flights. After 2 JAG Investigations, the decision was Navy can ask for access to your images if you are active and you take it on the job. So when Heater did a book for Marine Corps (
Forged in Steel), he told them he was doing on leave and they had to give him base access, physiology training, flight gear, etc. so the JAG folks couldn;t claim he took advantage of his active status.
My rule has always been to find out the installation rules before hand. That said I do not like to take photographs of people (military) without their knowledge/permission. This is somewhat different when at an air show or some other public event. But aboard a military installation I shy away from taking identifiable photographs of personnel.
Good advice
As an aside, at an Air Show I took a photo of the static display of a Super Hornet, razor sharp view of the air intake. A SH jock friend became unglued, said the photo should be classified.
Last time I went to Fallon, part of PAO brief when I got my renewed camera pass was the sensitive areas of the SH. Shame on that aircrew for not installing proper safeguards at an airshow where cameras abound.