I have a Mossberg with the safety on top and have had it accidentally get moved to the fire position, not a good thing if you keep one in the chamber. I'm not positive but I think the safety rubbed against the bottom of my Duluth pack while hand carrying it on a portage.
Bears aren't the only thing you have to be concerned with. Since I've been spending more time back East I have gotten charged by a dog three times,( bitten once) and attacked by a raccoon(probably rabid.) I now carry a .357 Ruger SLR back there. In Ak. I carry bear spray and the Mossberg. I did switch to carrying a .357 instead of the shotgun because it is a PITA to carry. I sold the .357 back to my friend that I bought it from when he wanted it back and would like to replace it with a .44 mag.
I've never felt the need to have a gun as a deterrent for people in canoe country, but just about everywhere else in the outdoors I do. I had an incident hiking with my gf back in college. I kinda regret getting that short barrel Ruger, thinking I would rather something with a longer barrel that would be more visible to people.
If I had to choose between a firearm or bear spray I would take the spray for canoe country and the gun for elsewhere.
Having a gun, especially a rifle, is no guarantee of safety in an attack. The two people I know that have been attacked by grizzlies both had rifles, one was asleep, the other was dressing a deer and his rifle was nearby leaning against a tree. The key is to always have your protection on your person and, I guess, don't go to sleep
.
There was one time on a canoe trip that I had to get ready to use either the gun or spray. I encountered a small black bear on a portage and when I yelled at it he came towards me instead of away. I decided I would shoot it if I had to because it was legal and it was the last portage so I was OK with harvesting it. Luckily he did run away. I would not have wanted to be in that position with only a stick or paddle for defense. At one time I thought I would be OK with a stick against a black bear, but after the raccoon incident I don't want to find out.