Bug 149686 - tar behaviour changed
tar behaviour changed
Product: Fedora
Classification: Fedora
Component: tar (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Peter Vrabec
Ben Levenson
Depends On:
  Show dependency treegraph
Reported: 2005-02-25 03:33 EST by Need Real Name
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-07-18 10:36:15 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Need Real Name 2005-02-25 03:33:31 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20041020 Epiphany/1.4.4

Description of problem:
If a .tgz archive contains an entry such as
 dr-xr-xr-x root/sys          0 2004-04-19 18:17:50 ./
then extracting it in /tmp/ will change the permissions on that directory, removing the sticky bit, and confusing applications.

Distro    Version         Changes permissions on .?
RHEL 3    1.13.25-13      No
Sarge     1.13.93-4       Yes
Fedora 3  1.14-4          Yes

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:

Additional info:
Comment 1 Peter Vrabec 2005-03-25 10:15:20 EST
$ ls -l | grep tmp
drwxrwxrwt   23 root root  4096 Mar 25 15:41 tmp
$ cd tmp
$ tar -tvzf pok.tgz
drwxrwxrwx peter/peter       0 2005-03-25 15:41:06 ./
-rw-r--r-- peter/peter    4152 2005-03-04 13:34:47 ./mrtprecv.c
-rw-r--r-- peter/peter    4149 2005-03-04 13:34:55 ./mrtpsend.c
-rw-rw-r-- peter/peter       0 2005-03-25 15:41:06 ./pok.tgz
-rw-r--r-- peter/peter     560 2005-03-04 13:25:55 ./Makefile.am
-rw-r--r-- peter/peter    2576 2005-03-04 13:36:31 ./tevrtpsend.c
-rw-r--r-- peter/peter    4520 2005-03-04 14:42:54 ./tevmrtprecv.c
-rw-r--r-- peter/peter    3859 2005-03-04 13:35:17 ./rtprecv.c
-rw-r--r-- peter/peter   18866 2005-03-15 12:30:22 ./Makefile.in
-rw-r--r-- peter/peter    2883 2005-03-04 13:35:28 ./rtpsend.c
-rw-r--r-- peter/peter    2780 2005-03-04 13:36:12 ./tevrtprecv.c
-rw-r--r-- peter/peter    3779 2005-03-04 13:35:07 ./rtpmemtest.c
-rw-r--r-- peter/peter    1246 2005-03-04 13:35:40 ./test_timer.c
$ tar -xvzf pok.tgz
tar: .: Cannot utime: Operation not permitted
tar: .: Cannot change mode to rwxrwxr-t: Operation not permitted
tar: Error exit delayed from previous errors
$ ls -l / | grep tmp
drwxrwxrwt   23 root root  4096 Mar 25 15:49 tmp

Tar only remove the sticky bit from /tmp only when u run it as a root.
Comment 2 Need Real Name 2005-03-25 10:38:18 EST
Yes, and this doesn't happen in RHEL3, tar 1.13.25-13.
Comment 3 Need Real Name 2005-06-06 04:31:55 EDT
This behaviour change, different from RHEL3, is causing me a tremendous amount
of grief.


I have an a tar archive whose first entry is "the current directory" with
no-write permissions. tar fails because my current directories write permissions
have been turned off. Great!
Comment 4 Matthew Miller 2006-07-10 16:58:28 EDT
Fedora Core 3 is now maintained by the Fedora Legacy project for security
updates only. If this problem is a security issue, please reopen and
reassign to the Fedora Legacy product. If it is not a security issue and
hasn't been resolved in the current FC5 updates or in the FC6 test
release, reopen and change the version to match.

Thank you!
Comment 5 Peter Vrabec 2006-07-18 10:36:15 EDT
I have found same upstream bug report:

using patch from upstream

fixed in tar-1.15.90-4

Note You need to log in before you can comment on or make changes to this bug.