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

tar x --no-overwrite-dir breaks since update to 1.30-9

Linking RHIVOS CVEs to...Migration: Automation ...SWIFT: POC ConversionSync from "Extern...XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done-Errata
    • Icon: Major Major
    • rhel-8.10.z
    • rhel-8.8.0, rhel-8.10
    • tar
    • None
    • tar-1.30-11.el8_10
    • Yes
    • Moderate
    • Upstream
    • Customer Facing, Customer Reported
    • 1
    • rhel-base-utils-core
    • ssg_core_services
    • 3
    • False
    • False
    • Hide

      None

      Show
      None
    • Yes
    • Red Hat Enterprise Linux
    • BaseUtilsC Sprint CY25_00
    • Unspecified Release Note Type - Unknown
    • All
    • None

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

      Extracting tar archive using --no-overwrite-dir as a user fails when the target directory is owned by root, whereas it was a success with up to tar-1.30-6.el8_7.1 included.

      Please provide the package NVR for which bug is seen:

      tar-1.30-9.el8

      How reproducible:

      Always

      Steps to reproduce

      1. Create a dummy archive as a user
        $ mkdir tartest
        $ touch tartest/foo
        $ tar cf tartest.tar -C tartest .
        $ tar tvf tartest.tar 
        drwxrwxr-x admin/admin       0 2024-09-04 08:46 ./
        -rw-rw-r-- admin/admin       0 2024-09-04 08:46 ./foo
      2. Extract it to /tmp
        $ tar xf tartest.tar -C /tmp --no-overwrite-dir
        tar: .: Cannot change mode to rwxrwxrwx: Operation not permitted
        tar: Exiting with failure status due to previous errors

      Expected results

      Success

      Actual results

      Failure on fchmodat():

      16524 08:48:46.671958 fchmodat(4</tmp>, ".", 0777) = -1 EPERM (Operation not permitted) <0.000005>

      The failing patch is tar-1.30-Fix-the-no-overwrite-dir-option

              rhn-support-pcahyna Pavel Cahyna
              rhn-support-rmetrich Renaud Métrich
              Pavel Cahyna Pavel Cahyna
              Radka Brychtova Radka Brychtova
              Votes:
              3 Vote for this issue
              Watchers:
              13 Start watching this issue

                Created:
                Updated:
                Resolved: