title: Recursively set all files and folders to 777 from this list
body: <p>I've tried endlessly searching for a solution to this, but couldn't seem to find out.</p>
  
  <p>I have a list of paths:</p>
  
  <pre><code>dirToModify = ['includes/','misc/','modules/','scripts/','themes/']
  </code></pre>
  
  <p>I want to loop through each list-item (a dir in this case) and set all files and dirs to <code>777</code></p>
  
  <p>I've done this for files like:</p>
  
  <pre><code>for file in fileToModify:
      os.chmod(file, 0o777)
  </code></pre>
  
  <p>But can't seem to figure out a good way to do this recursively to folders.</p>
  
  <p>Can anyone help?</p>