Is there a way to back up and restore file ownership and permissions (the things that can be changed with chown
and chmod
)?
You can do this in Windows using icacls.
What about access control lists?
aclbackupfilespermissions
Is there a way to back up and restore file ownership and permissions (the things that can be changed with chown
and chmod
)?
You can do this in Windows using icacls.
What about access control lists?
Best Answer
You can do this with the commands from the acl package (which should be available on all mainstream distributions, but might not be part of the base installation). They back up and restore ACL when ACL are present, but they also work for basic permissions even on systems that don't support ACL.
To back up permissions in the current directory and its subdirectories recursively:
To restore permissions: