I struggle with this constantly and have for years. I'm learning that a lot of my struggle stems from my battle with Cptsd. I was so afraid as a child to speak up that I genuinely don't know how to do it now. So, I have to learn to be more assertive and and not freeze with fear that the person will hurt me, which triggers my fawn/freeze response (see Pete Walker's Surviving to Thriving or
Pete Walker, M.A. Psychotherapy for a description of the four F's).
I was remembering an incident from childhood that made me think about how far back my freezing goes. I was dressed up for Easter and ready to go to church. I was wearing a pair of shoes that were too small and my feet hurt so bad. But I was so afraid of getting in trouble for saying something that I wore those horrible shoes all day until I wanted to cry from the pain.
So, I think part of it is, somewhere along the line I either forgot how to speak up or never learned. I'm a compassionate person too, so codependency and being walked all over is a constant problem for me.