Environment
SUSE Linux Enterprise Server
Situation
Need to back up permissions
Permissions are incorrect because the cp command was ran without the argument -p for keep permissions
Permissions are incorrect because the cp command was ran without the argument -p for keep permissions
Resolution
For the example below, /usr will be used as the directory to backup and restore
-
Launch a terminal session and change to the parent of the directory that needs to be backed up
-
Type getfacl -R /usr > p.acl to create a permissions file called p.acl
- Copy the p.acl to the server where you want to restore permissions on
- Launch a terminal session and change to the directory of the p.acl file
- type setfacl --restore=p.acl to restore the permissions