I'm copying a bunch of files to a filesystem that doesn't support permissions. however, I will need to copy them to another filesystem which does support permissions a few years from now. at that point the current filesystem or its current state will be unavailable to me.
Is there a way to preserve them in an understandable and sane way that the next guy can understand and apply to the files?

I'm looking for something like this

  • You may find something that helps in : unix.stackexchange.com/a/549577/27616 (edit: better answer, and creates a permissions files with the info in it) Sep 4, 2023 at 9:42
  • Considered using a loopback filesystem or an archive which supports permissions (e.g. tar)?
    – symcbean
    Sep 4, 2023 at 9:55
  • @symcbean Yes. unfortunately that would result in a filesize that's not supported by e.g. fat32 and didn't want to get into the tedium of splitting tar files.
    – Behrooz
    Sep 5, 2023 at 7:24

1 Answer 1


I think that the most portable format you could pick is probably to make a Posix-compliant tar archive.

But you first need to figure out exactly what permissions/attributes/flags you want to save.

Posix tar supports 'extended attributes' - but by default it doesn't support SELinux context.

  • What to you mean by Posix tar? Is that the pax interchange format? Sep 4, 2023 at 16:13
  • Yes. GNU tar --format=posix will generate a POSIX 1003.1-2001(pax) format archive. That's very portable and most likely supports all you need.
    – Popup
    Sep 5, 2023 at 9:29

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .