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

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

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Undefined Undefined
    • None
    • rhel-8.9.0
    • rpm
    • None
    • Minor
    • sst_cs_software_management
    • ssg_core_services
    • False
    • Hide

      None

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

      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 Metrich
            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: