unless you have express permission beforehand. but even this comes with a caveat – there’s a big difference between asking someone who just came out of a cocktail bar with a cool fit and asking a person sitting on the sidewalk with their hat out for change. Of course there’s lots of grey area in here, but it’s just super important to think about your intention with taking the photo, and to intuit the implication of your asking someone.
The other case is if it’s not a portrait, and done inconspicuously. So this would usually mean from afar and/or amongst others, with no defining characteristics visible. This is also a grey area (depending on who/where/why) but I’d say it’s probably mostly ok. Just think before you shoot!