Correcting files and directory permission recursively

To change all the directories to 755 (drwxr-xr-x):

1 find /var/www/mywebapplication -type d -exec chmod 755 {} \;

To change all the files to 644 (-rw-r--r--):

1 find /var/www/mywebapplication -type f -exec chmod 644 {} \;