It's a pretty well known thing where I usually ride to yell a "left" when passing someone. The more crowded trails I have ridden are usually very friendly. Most mountain bikers I've been around are pretty cordial people. On group road rides you usually get the same except for the newbies who don't know better. We also do a little finger wag when going by an obstacle like gravel or glass on the road to warn those behind us that something is there. It's an endorphin thing...