Fedora Account System
Red Hat Associate
Red Hat Customer
file command shipped with Fedora 43 can't detect large ZIP archive's file type. If an archive is smaller than around 7MiB, file command says it's ZIP file. But for a larger archive, file command says it's "data". Fedora 41's file command did not have this problem. Reproducible: Always Steps to Reproduce: 1.Create ten 1MiB data files with dd bs=1MB count=1 if=/dev/urandom of=filename 2.Create a 10MiB ZIP archive contains that data files (with zip or 7za) 3.Inspect that zip archive with file command Actual Results: foobar.zip: data Expected Results: foobar.zip: Zip archive data, made by ... Additional Information: I wrote an attached shell script to reproduce this problem. typical result is below -rw-r--r--. 1 morioka morioka 5000892 1月 6 14:17 small7zaE7zaKq2Z.zip -rw-r--r--. 1 morioka morioka 5001763 1月 6 14:17 smallzipE7zaKq2Z.zip smallzipE7zaKq2Z.zip: Zip archive data, made by v3.0 UNIX, extract using at least v1.0, last modified, last modified Sun, Jan 06 2026 14:17:40, uncompressed size 0, method=store small7zaE7zaKq2Z.zip: Zip archive data, made by v6.3 UNIX, extract using at least v2.0, last modified, last modified Sun, Jan 06 2026 14:17:40, uncompressed size 0, method=store 00000000: 504b 0304 0a00 0000 0000 3472 265c 0000 PK........4r&\.. 00000000: 504b 0304 1400 0000 0000 3472 265c 0000 PK........4r&\.. -rw-r--r--. 1 morioka morioka 10003358 1月 6 14:17 largezip4NZF9Hb2.zip -rw-r--r--. 1 morioka morioka 10003358 1月 6 14:17 largezip4NZF9Hb2.zip largezip4NZF9Hb2.zip: data large7za4NZF9Hb2.zip: data 00000000: 504b 0304 0a00 0000 0000 3472 265c 0000 PK........4r&\.. 00000000: 504b 0304 1400 0000 0000 3472 265c 0000 PK........4r&\..
Created attachment 2121248 [details] a script to reproduce the bug This script create these four ZIP archives, and check it with file command. - created by zip command, about 5MiB size. - created by 7za command, about 10MiB size. - created by zip command, about 5MiB size. - created by 7za command, about 10MiB size.
F43's file command always fail to detect ZIP archive from STDIN.
This is still an issue with F44's File 5.46, but I believe it is fixed[1][2] in the subsequent File 5.47 and 5.48 releases. And the piping issue was explicitly fixed by another commit[3] that's also in 5.47 and 5.48. The simplest solution would be updating File in Fedora 44 to the recent 5.48 release. Would it be possible to push out builds of 5.48 for F44? Two commits improving zip detection in general: [1]: https://github.com/file/file/commit/60b2032b96fc185b37fb0f2152e834efb2edad6e [2]: https://github.com/file/file/commit/02846ac1e5c9d8154342c1680082e80d2faeadf8 And the piped-zip-file fix: [3]: https://github.com/file/file/commit/f1adef05b8a85be50d28965b1fd21fcceacf7a4e
All: I've made a Copr build of file 5.48 for F44 and F43 (all architectures except i386), you can find the packages here: https://copr.fedorainfracloud.org/coprs/ferdnyc/file/build/10677931/ Or install them by running these commands in a terminal: sudo dnf copr enable ferdnyc/file sudo dnf upgrade file (Answering 'y' to any confirmation prompts that come up.) In my tests on Fedora 44, file 5.48 is once again able to identify Zip files correctly, that 5.46 lists only as 'data' — whether scanned by filename or through a pipeline via `cat somefile.zip | file -`.
Thank you FeRD. I installed file-5.48-0.1.fc43.x86_64 from copr, and it identified correctly all ZIP file I have.
Thanks for testing and confirming! Based on that, I've submitted a PR[1] to the project file repo, to update the rawhide branch. Along with a request to push new F44 and F43 builds as well. [1]: https://src.fedoraproject.org/rpms/file/pull-request/46
FEDORA-2026-412ea7bd7b (file-5.48-1.fc45) has been submitted as an update to Fedora 45. https://bodhi.fedoraproject.org/updates/FEDORA-2026-412ea7bd7b
FEDORA-2026-24396f548e (file-5.48-1.fc44) has been submitted as an update to Fedora 44. https://bodhi.fedoraproject.org/updates/FEDORA-2026-24396f548e
FEDORA-2026-f218bce1f9 (file-5.48-1.fc43) has been submitted as an update to Fedora 43. https://bodhi.fedoraproject.org/updates/FEDORA-2026-f218bce1f9
FEDORA-2026-24396f548e has been pushed to the Fedora 44 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2026-24396f548e` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2026-24396f548e See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-2026-f218bce1f9 has been pushed to the Fedora 43 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2026-f218bce1f9` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2026-f218bce1f9 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
5.48 appears to break decompression of at least bzip2 and xz files. See https://bodhi.fedoraproject.org/updates/FEDORA-2026-412ea7bd7b#comment-4704886 .
(In reply to Adam Williamson from comment #12) > 5.48 appears to break decompression of at least bzip2 and xz files. See > https://bodhi.fedoraproject.org/updates/FEDORA-2026-412ea7bd7b#comment- > 4704886 . It didn't break. That wasn't working in 5.46 either.
Or, no, apparently I'm wrong about that. https://bodhi.fedoraproject.org/updates/FEDORA-2026-24396f548e#comment-4704889
FEDORA-2026-49eaa2233d (file-5.48-3.fc46) has been submitted as an update to Fedora 46. https://bodhi.fedoraproject.org/updates/FEDORA-2026-49eaa2233d
FEDORA-2026-412ea7bd7b has been pushed to the Fedora 45 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2026-412ea7bd7b` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2026-412ea7bd7b See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-2026-49eaa2233d (file-5.48-3.fc46) has been pushed to the Fedora 46 stable repository. If problem still persists, please make note of it in this bug report.