The idea of a "Space Shuttle Door Gunner" has always been a joke around the military. It's so outlandishly silly that no one would dare think it's real.
With last year's proposed Space Corps, the expansion of civilian space programs, and a growing need for a military presence in space to protect American assets, President Trump gave his nod to the idea of a "Space Force." This joke may soon be reality. But there are still many roadblocks in the way – like physics, for instance.
For obvious reasons, the door would have to be closed during takeoff and landing, otherwise, friction alone would tear the shuttle apart. Tragic examples of what foam shedding and a faulty O-ring can cause means that any fighting a door gunner would see would have to occur beyond a distance from Earth to allow for EVA (extravehicular activity).
"Get some! Get some! Get some!" (NASA photo)
Now that the door gunner is properly outside of Earth's atmosphere, they could begin their watch. A properly tethered door gunner could hold their post for a while. The current record for longest EVA, also known as a "spacewalk," is held by Cosmonauts Fyodor Yurchikhin and Alexander Misurkin at 7 hours and 29 minutes. They walked outside of the International Space Station to install power and data cables — but a door gunner could hold that post for longer.
Finally, the nitty-gritty of space combat. A door gunner could easily bring modern weapons into space and, surprisingly, only have a few problems firing it. This is because modern ammunition has its own oxidizer, so no atmospheric oxygen is required. There wouldn't be any sound (since audible sound doesn't travel in a vacuum) and the recoil wouldn't matter in low-Earth orbit because the shuttle would be moving at around 4 miles a second.
Tests on Earth have proven bullets fire in a vacuum. (via GIPHY)
The downsides would be that, without friction to slow down the bullet, it would travel until it hit something — the enemy, Earth, or some distant object forever away. Also, without gravity and oxygen to dissipate the gunpowder smoke, a large cloud would expand from the barrel.
So, yes, being a Space Shuttle Door Gunner is physically possible and may be needed one day.