title: Copy file permissions, but not files
body: <p>I have two copies of the same directory tree. They almost have the same files in both (one version may have a couple extra or missing files). However, most of the files are in common to both directories (have the same relative paths and everything).</p>
  
  <p>Assume these are in directories:</p>
  
  <pre><code>version1/
  version2/
  </code></pre>
  
  <p>The problem is that the permissions in version1/ got messed up, and I would like to copy over the permissions from version2/, but do it without replacing the files in version1/ which are newer.</p>
  
  <p>Is there an automated way to do this via bash? (It doesn't have to be bash, it could be some other method/programming language as well).</p>