HOWTO : Change mode of files and directories in batch

To change the mode to 777 for all directories under /var/www/drupal.



sudo find /var/www/drupal/*/ -type d -exec chmod 777 {} \;



To drop the execution rights of the all files under /var/www.



sudo find /var/www -type f -exec chmod -x {} \;



That's all! See you.