title: Bash Script: Changing file permissions recursively
body: <p>I need a Bash script that changes the file permissions of all files in a directory and all subdirectories. It should behave like this:</p>
  
  <pre><code>for each file in directory (and subdirectories)
     if i am the owner of the file
        if it is a directory
           chmod 770 file
        else
           chmod 660 file
  </code></pre>
  
  <p>I guess it's not a difficult task but I am not very experienced in Bash scripts. Your help is appreciated! :D</p>