0

I have access to multiple POSIX desktops where my personal user account has different UID/GID. I use an ext4 formatted portable SSD, which is great for my work, except for the permissioning issues arising from having different UID/GID on the different desktops. I understand the design trade-offs of UID/GID permissioning, and synchronizing UID/GID across those desktops is not an option. Is there a better solution than starting my work session on each desktop with:

sudo chown -R `id -un`:`id -gn` /media/$USER/disk

that

  1. does not require root priviliege;
  2. does not unnecessarily write metadata (and wear the SSD);
  3. does not require the creation/management of additional groups or other UID/GID manipulations on any of the concerned desktops;
  4. does not require setting specific permission to individual files; and
  5. does not add (unnecessary) complexity?
Yuv
  • 101
  • 3
  • How about ACLs ? They are part of a POSIX standard that has been withdrawn, but if they are compatible with your different systems they might be a workaround – LL3 Aug 30 '19 at 16:58
  • are you opposed to a using an existing group(or potentially creating a new one) that could use a shared GID across the systems? (cheating just short of a complete UID/GID sync). Files could then be group-owned and writable by that ID. – Jeff Schaller Aug 30 '19 at 20:08
  • I have clarified the criteria, some of which I wrongly assumed implicitly. We all want our removable media to just work out of the box, don't we? ACL add unnecessary complexity. creating a new group? not sure how this would work without synchronizing that newly created group across machines, which is, *not an option*. – Yuv Aug 30 '19 at 20:10
  • 1
    See also: [Can I port user permissions across computers for an ext4 external hard drive?](https://unix.stackexchange.com/questions/126213/can-i-port-user-permissions-across-computers-for-an-ext4-external-hard-drive), and [Is it possible to disable file permissions on a ext3 or ext4 file-system?](https://unix.stackexchange.com/questions/67105/is-it-possible-to-disable-file-permissions-on-a-ext3-or-ext4-file-system) – cas Aug 30 '19 at 23:59

0 Answers0