San Francisco statutes can be determined by calling the court or looking up your RSA's at the library or online. SF is usually pretty clear about posting correct parking.
Vehicles can be towed for a long list of reasons. Towing in San Francisco is big business, which often makes it difficult to dispute a towing bill. The best thing to do is involve the police if the tow is in dispute.