bug-tar
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-tar] tar 1.28: Use of --one-top-level changes permissions of workin


From: Schleusener, Jens
Subject: [Bug-tar] tar 1.28: Use of --one-top-level changes permissions of working directory
Date: Sat, 30 Apr 2016 14:31:30 +0200 (CEST)
User-agent: Alpine 2.20 (LSU 67 2015-01-07)

Hi,

after long searching I now found the reason for some mysterious directory permission changes on a Linux server that uses partially a self-compiled tar version 1.28 (under the name "gnutar"):

If one unpacks a tar-archive using the option --one-top-level and the
archive contains an entry like

 ./

than the current working directory get the permissions (and the date) of that directory in the tar archive file.

Here an example (notice the permission change of the directory /tmp/testdir):

 /tmp/testdir> ls -ld .
  drwxr-xr-x 2 user group 4096 30. Apr 14:10 .
 /tmp/testdir> /usr/local/bin/gnutar tvf /tmp/tartest.tar
  drwx--xr-- user/group    0 2016-04-30 13:44 ./
  drwxr-xr-x user/group    0 2016-04-30 13:44 ./foo/
  -rw-r--r-- user/group    0 2016-04-30 13:44 ./foo/bar
 /tmp/testdir> /usr/local/bin/gnutar --one-top-level="/dev/shm/tartest_out" -xf 
"/tmp/tartest.tar"
 /tmp/testdir> ls -ld .
  drwx--xr-- 2 user group 4096 30. Apr 13:44 .

By the way I found that severe problem processing the archive "git-manpages-2.8.2.tar.gz".

Is that the expected behaviour or simply a wrong usage of tar respectively the option "--one-top-level" or is that a bug?

Regards

Jens



reply via email to

[Prev in Thread] Current Thread [Next in Thread]