Repository-based site deployment -- what to do about sites/default/files? I'm trying to get more rigorous about my process for deploying Drupal sites across development and production servers.  In particular, I'm experimenting with pulling the site from my SVN repository into a directory on the server and flipping a symlink to point the server to the updated site.  This makes sense to me, but I'm not sure how to handle the sites/default/files folder -- it's not in the repository created by the development process since those files are produced by the production users, and the directories inside this folder have different permissions than the default 0755 that I'm getting from doing the export.

So, what to do here?  My current guess is that sites/default/files should be physically moved out of the site directory and then symlinked back in, but wanted to check with others with more experience in this.  A related question is whether there are other files or directories in a Drupal installation that would need to have their permissions updated after an svn-based installation like this.  sites/default/settings.php comes to mind, for instance.  Anyway, is there any advice out there?  Thanks!
Ahh the age old question of how to properly deploy Drupal from dev->test->live. If you search around you will find many opinions and answers. There is no one answer and no singular method. The symlink solution is good one and is safe and simple. Another solution would be to use SVN to sync directly back to the same site/directory(s). You could mark certain files so that they are not pushed. If a mistake is made, you just revert. One other file I can think of that you may not want to overwrite is .htaccess. Other than that, settings.php and your files directory are about all that would need to be excluded.