`file` command mime types are inconsistent on RHEL6 with RHEL5.

Solution Verified - Updated -

Issue

  • Why does the mime types inconsistent on Red Hat Enterprise Linux 6 with Red Hat Enterprise Linux 5?
  • When run with the --mime option, the file command returns a generic result for ISO9660 files that is inconsistent with the version delivered with RHEL5.x.
  • On RHEL5.x, file-4.17 (expected result):
$ file --brief --mime rhel-workstation-6.4-x86_64-dvd.iso
application/x-iso9660
  • On RHEL6.4, file-5.04 (generic result):
$ file --brief --mime rhel-workstation-6.4-x86_64-dvd.iso
application/octet-stream; charset=binary
  • While technically correct, the significant magic for ISO9660 (string CD001 at offset 32769) has been missed.
  • Note that when run without the --mime option, the newer version of file returns a result consistent with RHEL5:
$ file --brief rhel-workstation-6.4-x86_64-dvd.iso
ISO 9660 CD-ROM filesystem data 'RHEL_6.4 x86_64 Disc 1         ' (bootable)

Environment

  • Red Hat Enterprise Linux 6
  • file-5.04-15.el6.x86_64

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content