How to set permissions for public folder?

Hi,

I’m using deprec+capistrano to deploy my app. The problem is that
everything is assigned to the user (and his group) that the
application was deployed by. This causes problems with i.e. caching,
because mongrel can’t write inside public dir.

How should I set permissions for public directory?