Restored system from backup, can't mount external drives, ACL problem?

Had a hard dirve failure on my wife’ computer, restored using the backup drive cloned with rsync (updated every night with a cron job).

Everything seems fine except that usb sticks or external hard drives won’t mount. The icon appears on the desktop but I get an error message about the path not being a directory.

I notice that the path /media/user has lost the “+” at the end of the listing with ls -la /media, i.e. its drwxr-x— instead of drwxr-x—+

What is the setfacl command to set this the way it is supposed to be?

I don’t know the correct solution, but a work around was to: chown user.user /media/user

At least drives can now be mounted and files used for read/write. I’d still like to find out how to correctly set the ACL properties the way they were originally.

First I tried System->Administration->UsersAndGroups and removed all the “advanced options” for user, then I added them again, but nothing changed. So just brute force made /media/user directory read/write by changing the ownership.

I found the solution for my future backups with rsync, do rsync -axAX instead of just -ax

1 Like

See also:

https://help.ubuntu.com/community/FilePermissionsACLs

For your backup, you should add the “-H” option to preserve hard links instead of having a copy of it.
Use rsync -axHAX.

regards,
BT

I never use hard links, does the installation make hard links as part of the installation process?

How was the backup drive formatted? What kind is it?

File system is not an issue as both drives are ext4, the purpose is to have a “spare” to get the system back up quickly, which it did, except for this issue with mounting external drives (usb sticks etc.) caused by the loss of the “extended permssions” and/or ACL.

I know the extra rsync options to use now so presumably it won’t happen next time, I’m looking for how to set these back the way the installer originally did it.

I can show you some in /etc here:
g> nobt@grincheux:/etc$ ls -ald *|grep 'lrwx'

lrwxrwxrwx 1 root root 35 oct 21 16:34 localtime -> /usr/share/zoneinfo/America/Toronto
lrwxrwxrwx 1 root root 19 mai 31 19:03 mtab -> ../proc/self/mounts
lrwxrwxrwx 1 root root 21 oct 8 06:11 os-release -> ../usr/lib/os-release
lrwxrwxrwx 1 root root 29 mai 31 18:57 resolv.conf -> ../run/resolvconf/resolv.conf
lrwxrwxrwx 1 root root 23 mai 31 18:30 vtrgb -> /etc/alternatives/vtrgb

There are quite many in /usr/lib for libraries and probably many more I don't know.

Your definitly don't want to be in a mess if you restore your OS do you ?

Regards,
BT