Recursive chown except .svn
find . -name .svn -prune -o -print | xargs chown www-data:www-data #Exclude another directory (cache) find . -name .svn -or -name cache -prune -o -print | xargs chown www-data:www-data