Score:1

Restore File Owner from Backup, but not Content

in flag

By mistake we did a

chown www-data:www-data / -R

on a production server.

We do have a backup, but as only the permissions are wrong we want to restore only the permissions from the backup, not the file content.

Is there a simple command for this, for example with rsync?

Score:1
in flag

It is possible with

getfacl -R /path/to/backup/on/backupserver > backup-acls.txt

and transfering the file on your production server, then

setfacl --test --restore=backup-acls.txt

After successfull test remove the --test option.

There might be errors for files such as PHP sessions which are no longer on the system, so these folders have to be checked manually.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.