0
I just moved a drive from one computer to another and realised that files were no longer accessible due to UID mismatch. My user had UID 1000 on one computer and the drive, whereas my user had UID 1001 on the other computer.
Is there a way to store permissions on a file-system so that one does not rely on UIDs matching on all computers? Do ACLs and xattrs store UIDs or user names?
2Im not an expert here but ACL's (and I believe xattrs) require uids/gids. It would possibly be easier to use a system to manage/centralize uids and gids then to try eliminate them as they are pretty fundamental to the OS. (maybe using ldap/sssd or a database backend plugged into PAM) – davidgo – 2016-12-30T10:22:44.423
Alternatively use a file system that doesn't permissions like that (FAT32) or make the files world readable. It might also work to use a sticky bit for a group that is available on "every" system so you would have a common denominator. – Seth – 2016-12-30T10:51:48.527
And even if you would store permissions not by some numerical id (which wastes a lot of space), what should happen if you move a filesystem from a computer that has user XYZ to a computer that doesn't have user XYZ? So you have the same problem either way. – dirkt – 2016-12-30T12:54:35.723
@dirkt: (Wishful thinking) It does not have to be wasteful. If UIDs and GIDs were UUID, they would grow from 4 bytes to only 16 bytes, which I feel is acceptable. Then it would be trivial for me to pick a UUID an ensure all my computers have my user correctly configured. – user1202136 – 2016-12-30T13:09:45.193