Why Mac ACLs Disappear When You tar Them to Linux
We hand-built the pax ACL record libarchive writes for a Mac file, ran it through GNU tar on a real Linux box, and watched a user the Mac ACL denied read the extracted file.
By Ram Velmurugan · Founder & Lead Developer, 1dot.ai
--acls flag only understands the Linux model (POSIX.1e). When an ACL from a Mac does make it into a tar archive as a portable record, it uses the keyword SCHILY.acl.ace for the NFSv4-style model macOS uses, and GNU tar 1.35 prints Ignoring unknown extended header keyword 'SCHILY.acl.ace' and moves on without applying it. The file extracts fine. The ACL entries don't come with it, and that cuts both ways: a grant is lost, and so is a deny entry, which in our test let a user the Mac had blocked read the file on Linux.Editorial note: 1dot.ai makes Quick X Folder Preview, a folder and archive preview app for Mac mentioned near the end of this guide. It plays no role in tar, ACLs, or anything tested below. Every command here ran in a Linux container (Ubuntu 24.04.5 LTS, GNU tar 1.35), not on a Mac. Where this post describes what macOS's own tar does by default, it is citing bsdtar's manual and a public libarchive commit, not a test we ran ourselves, since this session has no Mac attached. Everything from the pax header we built onward was reproduced firsthand on November 27, 2026. This is the third piece in our series on what survives a Mac-made tar archive moving to Linux, after our posts on COPYFILE_DISABLE and extended attribute errors.
The Short Version
You set up an ACL on a Mac, maybe through chmod +a, a shared folder's permissions, or an app that manages its own access rules, then archived the files with tar and moved them to a Linux server. The files arrive. The extra access you granted does not. No error stops the job, and tar -xf exits 0 either way, which is part of why this is easy to miss until someone can't read a file they should be able to.
We reproduced the mechanism directly in this session's own Linux container on November 27, 2026, including the one case where GNU tar actually prints something about it: tar: Ignoring unknown extended header keyword 'SCHILY.acl.ace'.
- Two Different ACL Models, Not Two File Formats
- What macOS's Own tar Actually Writes by Default
- We Built the NFSv4 Record by Hand and Extracted It
- For Contrast: a Real POSIX ACL Round-Trips Fine
- Five Scenarios, Five Outcomes
- What to Actually Do About It
- Not the Same Failure as Our Other tar Posts
- Does This Affect Our Own Apps?
- Sources & Further Reading
- FAQ
Two Different ACL Models, Not Two File Formats
It helps to be precise about what's actually different, because the fix depends on it. Linux's access control lists follow POSIX.1e, a draft that never became a full standard but shipped in every major Linux distribution anyway. macOS's follow the model closely based on NFSv4 ACLs, the kind NFSv4 file servers and ZFS use. One difference matters below: macOS ACLs hold only named users and groups. The NFSv4 special entries owner@, group@ and everyone@ do not exist on macOS, which is why libarchive adds them itself, mirroring the file's mode bits, when it writes a Mac ACL as NFSv4 (the comment in its archive_disk_acl_darwin.c says so).
| Model | Entries | Permission bits | Deny entries |
|---|---|---|---|
POSIX.1e (Linux) | user, group, a short list of named users/groups, mask, other | read, write, execute | No deny entries, only grants |
NFSv4-style (macOS) | Named users and groups only, in order (macOS has no owner@, group@ or everyone@ entries) | More than a dozen separate rights (read/write data, append, delete, chown, readsecurity, writesecurity, and more) | Explicit allow and deny entries, evaluated in order |
An NFSv4 deny entry has no POSIX.1e equivalent at all, since POSIX.1e only grants. A rights bit like chown or readsecurity has no POSIX.1e equivalent either, since POSIX.1e only covers read, write, and execute. Going from macOS to Linux is not a matter of reformatting the same information. Some of the information has no destination to land in.
What macOS's Own tar Actually Writes by Default
We don't have a Mac in this session, so this section is sourced directly from bsdtar's manual and a libarchive commit, not reproduced firsthand. By the manual's own wording, the default behavior for ACLs in create and update mode on macOS is off for the NFSv4 pax style this post is about. Instead, macOS's bsdtar defaults to --mac-metadata, which archives ACLs and extended attributes through Apple's copyfile(3) in AppleDouble format, a Mac-specific container meant for restoring on another Mac, not for a portable pax record. A libarchive commit on the subject puts it plainly: ACLs should not be archived as NFSv4 by default on macOS, and getting the portable NFSv4 pax style requires explicitly passing both --acls and --no-mac-metadata on the command line.
SCHILY.acl.ace scenario below is the less common case: someone deliberately asked for the portable style.We Built the NFSv4 Record by Hand and Extracted It
Since this session can't run macOS's bsdtar to generate a real SCHILY.acl.ace record, we built one ourselves with the keyword and text layout libarchive's own source uses. The record has what libarchive would write for a Mac file with mode 644 and one ACL entry: a named entry denying read to the user nobody, followed by the owner@, group@ and everyone@ entries libarchive adds to mirror the mode bits. It is modelled on the source, not captured from a Mac. Our earlier xattr post used the same approach for a Mac-style extended attribute:
$ python3 - <<'PY'
import tarfile, os
os.makedirs("src", exist_ok=True)
with open("src/mac.txt", "wb") as f:
f.write(b"mac data")
os.chmod("src/mac.txt", 0o644)
t = tarfile.open("macstyle.tar", "w", format=tarfile.PAX_FORMAT)
ti = t.gettarinfo("src/mac.txt", arcname="mac.txt")
ti.pax_headers = {
"SCHILY.acl.ace": "user:nobody:r-----a-R-c---:-------:deny:65534\n"
"owner@:rw-p--aARWcCos:-------:allow\n"
"group@:r-----a-R-c--s:-------:allow\n"
"everyone@:r-----a-R-c--s:-------:allow",
}
with open("src/mac.txt", "rb") as f:
t.addfile(ti, f)
t.close()
PY
$ tar --acls -xvf macstyle.tar -C out
tar: Ignoring unknown extended header keyword 'SCHILY.acl.ace'
mac.txt
$ echo "exit: $?"
exit: 0
$ getfacl out/mac.txt
# file: out/mac.txt
# owner: root
# group: root
user::rw-
group::r--
other::r--
$ su nobody -s /bin/sh -c 'cat out/mac.txt'
mac dataThe extraction succeeded, the file's content is intact, and only the base permission bits applied. The last two lines are the part that matters: the user the Mac ACL denied read the file anyway, through the ordinary other::r-- bit. Losing an ACL does not only remove extra access. When the ACL held a deny entry, it can open a file up. Dropping --acls entirely from the extract command produces the identical warning and the identical result, since the unknown-keyword warning isn't gated by the --acls flag at all. We ran both on Ubuntu 24.04.5 LTS with GNU tar 1.35 on November 27, 2026.
GNU tar's own --help text calls the option "Enable the POSIX ACLs support," not ACL support in general, which matches exactly what we found: it parses SCHILY.acl.access and SCHILY.acl.default, the POSIX.1e keywords libarchive and star both write, and has no handling at all for SCHILY.acl.ace.
For Contrast: a Real POSIX ACL Round-Trips Fine
To confirm this isn't a general tar-and-ACL problem, we ran the control case: a genuine POSIX ACL, set on this same Linux box, archived and extracted with GNU tar on the same box.
$ setfacl -m u:nobody:r-- acl1.txt
$ getfacl acl1.txt
# file: acl1.txt
user::rw-
user:nobody:r--
group::r--
mask::r--
other::r--
$ tar --acls -cf posix.tar acl1.txt
$ tar --acls -xf posix.tar -C out1
$ getfacl out1/acl1.txt
# file: out1/acl1.txt
user::rw-
user:nobody:r--
group::r--
mask::r--
other::r--The named-user entry for nobody survives exactly. GNU tar read the pax header, found SCHILY.acl.access=user::rw-\nuser:nobody:r--\ngroup::r--\nmask::r--\nother::r--, a keyword it understands, and applied it correctly. The gap in the earlier section has nothing to do with tar being unreliable with ACLs in general. It's specific to the one model it doesn't parse.
One more detail worth knowing: extracting that same posix.tar without --acls produces no warning and no error, and the ACL is simply never applied. Unlike the unknown-keyword case, a recognized keyword that extraction wasn't asked to restore is skipped in total silence.
Five Scenarios, Five Outcomes
| Scenario | What actually happens |
|---|---|
| Plain tar -cf on a Mac (default --mac-metadata), extracted on Linux | ACL never reaches a portable pax keyword at all; nothing for --acls to find |
| Mac's tar --acls --no-mac-metadata (forces NFSv4 pax style), extracted with GNU tar --acls | SCHILY.acl.ace ignored as an unknown keyword; base permission bits apply, ACL entries do not, and a denied user can read the file (simulated with a hand-built record) |
| Linux setfacl, then tar --acls -cf, extracted on Linux with tar --acls | Named-user entry restored exactly as set (tested) |
| Same Linux POSIX ACL archive, extracted without --acls | No warning, no error, the ACL entry is simply never applied |
| A pax header carrying both SCHILY.acl.access and SCHILY.acl.ace on one entry | The POSIX part restores correctly; the NFSv4 part is ignored with a warning (tested) |
The fifth row is a hypothetical we tested to see what GNU tar does when a single entry carries both a POSIX record and an NFSv4 record for the same file, something a cross-platform tool might emit for compatibility. GNU tar applies the part it understands and ignores the rest with a warning, rather than failing the whole entry.
What to Actually Do About It
You need the same effective access on the Linux side
Don't route it through tar. List what the Mac ACL actually grants and denies (ls -le in Terminal shows every entry; Get Info shows only a summary) and recreate the grants directly with setfacl -m u:username:rwx file on the Linux box. Deny entries need different handling, because POSIX.1e has none. A named entry with no permissions, such as setfacl -m u:username:--- file, blocks that user, and tightening the other bits with chmod o-r covers everyone else. This is the only option that doesn't depend on a translation that doesn't exist.
You're archiving for a restore on another Mac
Leave bsdtar's default --mac-metadata behavior alone and don't add --acls. That mechanism is what's actually designed to carry ACLs and extended attributes between two Macs through copyfile(3), and forcing the NFSv4 pax style only helps a destination that can read it, which Linux cannot.
You forced --acls and want to know what actually survived
Run getfacl on the extracted file and compare it against what you expected. If you see only the three base lines (user::, group::, other::) with no named-user or named-group entries, the NFSv4 record was ignored, exactly as we reproduced above.
Not the Same Failure as Our Other tar Posts
This is the third post in this series and it's worth being clear about how each failure differs, since they look similar from the error message alone. Our COPYFILE_DISABLE post covers an environment variable that macOS's own tools check on creation, and that Linux tools never read at all, since COPYFILE_DISABLE is Apple-specific code that only compiles where Apple's copyfile.h exists. Our extended attribute post covers a single named attribute, com.apple.quarantine, that ext4 and other Linux filesystems reject outright because its name doesn't start with any of the four namespaces they register, a naming problem at the kernel level. This post is neither of those. The ACL record is well formed and GNU tar reads past it without error. It has no handler for that keyword, because the keyword belongs to the one ACL model GNU tar does not implement. The file never fails to extract in any of the three cases. What's missing differs each time.
Does This Affect Our Own Apps?
No, and we'd rather say that directly than leave it implied. Quick X Folder Preview lets you look inside an archive's contents from the space bar before extracting it, which has nothing to do with how a Linux box handles ACLs afterward. Files Magic AI organizes, renames, and cleans up files on your own Mac and never touches a Linux filesystem. If a server or CI job is the one losing access grants after extraction, the setfacl approach above is the actual fix.
Sources & Further Reading
GNU tar's own ACL option, read from tar --help and the GNU tar manual's Extended File Attributes section (fetched live; gnu.org returned 503 to a direct fetch on November 27, 2026, the same intermittent failure noted in our earlier xattr post, so this is cross-checked against the installed binary's own --help output, GNU tar 1.35, rather than the page alone): --acls is documented as POSIX ACL support and is off unless you pass it, on create and on extract.
libarchive's ACL pax writer (archive_write_set_format_pax.c, read live via raw.githubusercontent.com on November 27, 2026): add_pax_acl() writes SCHILY.acl.ace when the entry's ACL type is NFSv4, and SCHILY.acl.access / SCHILY.acl.default for POSIX.1e access and default ACLs, each only when archive_entry_acl_to_text_l() returns a non-empty string.
bsdtar's manual on macOS-specific defaults, and a libarchive commit discussion on the same subject: the default ACL behavior in create and update mode is off for the NFSv4 pax style on macOS; --mac-metadata, which uses copyfile(3) and AppleDouble format, is the preferred and default route for carrying ACLs and extended attributes on macOS, and getting the portable NFSv4 pax style alone requires --acls --no-mac-metadata explicitly (libarchive commit of February 2017, "Do not archive NFSv4 ACLs on Mac OS X by default"). We read this from the manual and commit history; this session has no Mac to confirm it directly.
Two independent, unverified community reports that macOS access control information doesn't survive a move to another system by default: a restic forum thread where a maintainer attributes a lost macOS ACL after restore to restic not supporting NFSv4-style ACLs (stated with their own uncertainty, "AFAIK"), and a developer's account of a Mac-made tar archive losing group and other read access after extraction into a Linux container, attributed there to APFS metadata rather than demonstrated step by step. Neither report tests the same mechanism this post does; we cite them only as evidence this is a recurring real complaint, not as a source for any specific claim above.
Version banners in this post were read directly from tar --version (GNU tar 1.35), setfacl/getfacl from the acl package (version 2.3.2), and /etc/os-release (Ubuntu 24.04.5 LTS) in this session's own container on November 27, 2026.
Our related coverage: why COPYFILE_DISABLE does nothing when you tar on Linux, why tar can't restore Mac extended attributes on Linux, and what ._ files and the __MACOSX folder actually are.
Frequently Asked Questions
The Bottom Line
A Mac ACL going missing after a tar move to Linux isn't data loss and isn't a bug in either tool. By default, the ACL likely never leaves the Mac-only --mac-metadata container at all. Force the portable NFSv4 style with --acls --no-mac-metadata on the Mac side, and GNU tar on Linux reads the header, recognizes it as an extension it doesn't implement, says so once, and extracts the file anyway. Either way, the fix isn't a tar flag. It's setfacl, applied directly on the system that needs the access control, because POSIX.1e and NFSv4 are two different models and no archive format bridges them both ways.
Looking for more Mac-to-Linux troubleshooting? Read why COPYFILE_DISABLE does nothing on Linux, why tar can't restore Mac extended attributes, browse every 1dot.ai guide, or check Quick X Folder Preview's product page.
Want to See Inside an Archive Before You Open It?
Quick X Folder Preview adds 13 Quick Look extensions to the space bar, notarized by Apple. Free for 14 days, then $4.99 once for a lifetime license.
Try It FreeRead More Guides