title: How to clone ACL permissions?
body: <p>I've just found out that my backups were missing ACL and the restore will not work until this is fixed.</p>
  
  <p>Luckily I have the luxury of checking what the permissions should look like on a running system, e.g:</p>
  
  <p>RESTORED:</p>
  
  <pre><code># file: samba/sysvol
  # owner: root
  # group: 3000000
  user::rwx
  group::rwx
  other::---
  </code></pre>
  
  <p>RUNNING:</p>
  
  <pre><code># file: samba/sysvol
  # owner: root
  # group: 3000000
  user::rwx
  user:root:rwx
  group::rwx
  group:3000000:rwx
  group:3000001:r-x
  group:3000002:rwx
  group:3000003:r-x
  mask::rwx
  other::---
  default:user::rwx
  default:user:root:rwx
  default:group::---
  default:group:3000000:rwx
  default:group:3000001:r-x
  default:group:3000002:rwx
  default:group:3000003:r-x
  default:mask::rwx
  default:other::---
  </code></pre>
  
  <p>There are no trivial permissions patterns to follow so manual reconciliation would take very long and be error prone.</p>
  
  <p>QUESTION:</p>
  
  <p>Is it possible to "clone" ACL permissions?</p>
  
  <p>I.e. recursively read ACL (getfacl?) on all files and folders and write (setacl?) to the same list of files and folders elsewhere?</p>