>>39464091) Find a security guard before getting the camera out
2) Ask if there are any issues with you taking photos of X (some interesting landmark, general architecture, whatever) and if there are any thing they don't want you taking photos of
3) Get their name
4) Walk around taking photos of whatever
5) If some other guard asks what you;re doing, direct them to the guard you talked to earlier
Now instead of having security argue with you (you're not going to win, nobody give a shit about legality), you have security arguing with security.
Works great at sites that are publicly accessible. For actual access-restricted sites, you do need to jump through the hoops of permits and escorts, but you'd be surprised how accommodating some places can be. Bring a cheap SD card, some places may require review before they will release any photos (e.g. anything under ITAR), or you can try being a cheeky bastard with a dual-card camera and a quick hand, but that could go extremely poorly for you if they're even slightly competent.