|
From: | Johansson Ingemar Y |
Subject: | [Bug-tar] bug or feature? |
Date: | Thu, 14 Dec 2017 14:47:42 +0000 |
Tar does not preserv parent permissions on directorys. I have this problem when I use include list. The include list cat include /home/johaqing/index.html The create command tar cvpf tar.test.tar --files-from /root/include Listing the tar file shows nothing about the parent folders read/write/execute permissions. tar tvf tar.test.tar -rw-rw-r-- johaqing/johaqing 2478 2016-06-20 13:55 home/johaqing/index.html tar xvpf tar.test.tar -C /home/johaqing/ gives ls -la /home/johaqing/home/johaqing/ drwxr-xr-x 2 root root 23 Dec 14 15:19 . drwxr-xr-x 3 root root 21 Dec 14 15:19 .. -rw-rw-r-- 1 johaqing johaqing 2478 Jun 20 2016 index.html If tar would have preserved it correct the it would have been like this. ls -la /home/johaqing/ drwx------. 6 johaqing johaqing 4096 Dec 14 15:19 . drwxr-xr-x. 12 root root 4096 Jun 29 2016 .. -rw-rw-r-- 1 johaqing johaqing 2478 Jun 20 2016 index.html tar --version tar (GNU tar) 1.26 uname -a Linux XXX:XXX:XXX 3.10.0-327.10.1.el7.x86_64 #1 SMP Tue Feb 16 17:03:50 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux Is this a bug or is it as intended? Is there any workaround? BR Ingemar Johansson |
[Prev in Thread] | Current Thread | [Next in Thread] |