Recursively Chmod
Change chmod for all files and folders in concrete folder:
chmod -R 755 /srv/folder
Go to the folder in which you need to change chmod rights.
Change chmod for all files:
find . -type f -exec chmod 644 {} \;
Change chmod for all folders:
find . -type d -exec chmod 755 {} \;
Change chmod for all files and folders:
chmod -R 777 .
Recursively Chown
Change chown user and group for all files and folders as www-data:
chown -R www-data:www-data *