Linux: Copy file and directory permissions

How do you copy permissions recursively from one directory to another if you forgot to do ‘cp -rp’ when copying.

 

 

Here is how I did it:

root@server:/from/location/# getfacl -R * > /tmp/permissions.acl
root@server:/new/copy/of/location# setfacl --restore=/tmp/permissions.acl

If you’re new here, you may want to subscribe to my RSS feed.
Thanks for visiting!

2 Responses to “Linux: Copy file and directory permissions”


  1. Gravatar Icon 1 atul

    Thanks for this one – saved my re-install

  2. Gravatar Icon 2 pete

    thanks for this

Leave a Reply