As always, there may be more than one side to the story. Let's see how all this unfolds.
From this link:
http://blogs.usatoday.com/ondeadline/2007/09/city-officials-.html
Because the director didn't choose the locations until a few days before they were scheduled to film, Block says the company didn't have time to get the required approvals from local residents who would have been inconvenienced during the filming.
According to the same source, they actually did have a permit to film but for a different day.
A quick google search for San Francisco film permits leads here:
http://www.sfgov.org/site/filmcomm_page.asp?id=33079
Amongst other things, you can learn that the Department of Parking and Traffic requires a four day heads up to help with traffic control, and that local residents have to be notified at least 72 hours ahead of an event.
This unfortunate event may be the result of poor planning on the director's behalf and San Francisco bureaucrats sticking to written policies.
/ J