Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-33397

dnf fails with misleading "cpio: open failed - Not a directory" error message

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Undefined Undefined
    • rhel-9.5
    • rhel-9.3.0
    • rpm
    • None
    • None
    • Low
    • rhel-sst-cs-software-management
    • ssg_core_services
    • 20
    • None
    • False
    • Hide

      None

      Show
      None
    • None
    • Red Hat Enterprise Linux
    • None
    • None
    • None
    • Release Note Not Required
    • None

      Cloned for RHEL9 since it also happens with rpm-libs-4.16.1.3-27.el9_3

      What were you trying to do that didn't work?

      A customer hit an issue with installing a kernel (which pushes files in /lib directory in particular), I was getting the following error message:

        Installing       : kernel-core-4.18.0-513.18.1.el8_9.x86_64                                                             1/2 
      error: failed to open dir lib of /lib/: Not a directory
      
      Error unpacking rpm package kernel-core-4.18.0-513.18.1.el8_9.x86_64
      [...]
      

      After much digging, it was found that /lib exited and was the appropriate symlink to /usr/lib but /lib was owned by some non-root user.

      The error message tends to indicate the errno of a previous C function was reused inadvertently.

      Please provide the package NVR for which bug is seen:

      rpm-libs-4.14.3-28.el8_9

      How reproducible:

      Always

      Steps to reproduce

      1. Change ownership of /lib symlink
        # useradd user
        # chown -h user /lib
      2. Install a kernel
        # yum install kernel-core-4.18.0-513.18.1.el8_9

      Expected results

      Some self-explanatory error message

      Actual results

      Cryptic misleading message

              mdomonko@redhat.com Michal Domonkos
              rhn-support-rmetrich Renaud Métrich
              packaging-team-maint packaging-team-maint
              Software Management QE Software Management QE
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: