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: Always Steps to Reproduce: x Additional info:
$ 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 ./ ./mrtprecv.c ./mrtpsend.c ./pok.tgz ./Makefile.am ./tevrtpsend.c ./tevmrtprecv.c ./rtprecv.c ./Makefile.in ./rtpsend.c ./tevrtprecv.c ./rtpmemtest.c ./test_timer.c 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.
Yes, and this doesn't happen in RHEL3, tar 1.13.25-13.
This behaviour change, different from RHEL3, is causing me a tremendous amount of grief. Why? 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!
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!
I have found same upstream bug report: http://lists.gnu.org/archive/html/bug-tar/2006-04/msg00004.html using patch from upstream http://cvs.savannah.gnu.org/viewcvs/tar/tar/src/extract.c?r1=1.89&r2=1.90&diff_format=u fixed in tar-1.15.90-4