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

Changes in the way tar(1) constructs directory permissions



There has been changes in the way a tar(1) restore to a temporary
directory constructs directory ownerships; as login theuser, in
${HOME}:

mkdir xxx xxx/yyy; touch xxx/yyy/zzz
su
Password:
# cd /
# tar cvf home/theuser/aaa.tar home/theuser/xxx
  home/theuser/xxx/
  home/theuser/xxx/yyy/
  home/theuser/xxx/yyy/zzz
# cd /home/theuser/
# mv xxx xxx.bak
# tar xvf aaa.tar
  home/theuser/xxx/
  home/theuser/xxx/yyy/
  home/theuser/xxx/yyy/zzz
# ls -al home /home

  /home:
  total
  drwxr-xr-x  6 root    root     4096 Nov  6 23:52 ./
  drwxr-xr-x 28 root    root     4096 Nov  7 10:41 ../
  drwxr-xr-x 72 theuser users    16384 Nov  8 00:14 theuser/

  home:
  total
  drwxr-xr-x  3 root root   4096 Nov  8 00:14 ./
  drwxr-xr-x 72 theuser users 16384 Nov  8 00:14 ../
  drwxr-xr-x  3 root root   4096 Nov  8 00:14 theuser/
                ^^^^^^^^^
                ^^^^^^^^^
                ^^^^^^^^^

I verified that the ownership of the restored directory, theuser/, was
correct in a 2012 version of Linux.

    John

-- 

John Conover, conover@rahul.net, http://www.johncon.com/


Reply to: