That was a “fun” debugging session…

  • tetris11@lemmy.ml
    link
    fedilink
    arrow-up
    15
    ·
    edit-2
    1 month ago

    Just bear in mind that uid 1001 on one machine is not generally uid 1001 on another, and that if you copy the tar off machine you’re more than likely giving permission to somebody other than the intended target

  • HiddenLayer555@lemmy.ml
    link
    fedilink
    English
    arrow-up
    6
    ·
    edit-2
    1 month ago

    Worse, it preserves “special” files like the ones in /dev or /var which aren’t removable by anyone other than root. Love extracting a system file backup in my file server as a regular user in order to get just a few files out of it, and promptly not being able to fully delete it afterward without SSHing into the server and using sudo.

    I don’t get how a regular user can even create files like that. Sounds like a security vulnerability.

  • monovergent@lemmy.ml
    link
    fedilink
    arrow-up
    3
    ·
    1 month ago

    Learned to make use of this the hard way when transferring a directory over a FAT32 USB drive messed up the permissions.

  • PseudoSpock@lemmy.dbzer0.com
    link
    fedilink
    arrow-up
    2
    ·
    1 month ago

    For those wishing they could do that with zip and 7zip, you can add a permissions file to the archive that you first make with getfacl, and then on the target after extracting said archive, restore permissions and ownership with setfacl from that file.

    Handy for certain support organizations that insist on a zip but that later want the permissions. (Looking at you SAP and IBM).