I have a CCW permit that is a state permit, albeit issued by my county. As a state permit, it is supposed to be good anywhere in the state. I understand that SF will not honor it. I wish a state court would take SF to task over this issue also. I go there only rarely, but this irks me.
It's like that in New York. In the mid '70s I was issued a NY State pistol permit by Niagara County. It was valid everywhere in the state except New York City. If I remember right, NYC permits were issued by the Chief of Police, and were very difficult to obtain without friends in high places.
I left in 1977 and never looked back.