* tar and dir attribs
@ 2004-01-22 16:42 T. Horsnell (tsh)
0 siblings, 0 replies; only message in thread
From: T. Horsnell (tsh) @ 2004-01-22 16:42 UTC (permalink / raw)
Hi all,
ES45, TU64 V5.1B PK2
I'm seeing some very odd behaviour with tar.
If I tar up a directory which has protection 1777
(rwxrwxrwxt) and then untar it into a different
place, the new directory only has protection 755.
If I repeat the operation with the new directory
already in place, its protection changes to 1777
I'm doing this logged in as (not su'd to) root.
Have I missed some subtle comment in the man pages,
or is something amis with tar? The procedure
works correctly with Gnu-tar.
The following script will demonstrate the problem:
Can anyone with the same OS version and patch level
confirm/deny what I'm seeing?
Thanks,
Terry.
#!/bin/csh
#
#####Run me as root in a scratch directory:
#make a source directory
mkdir tmp1
#
#make a test dir in that source dir with protection 1777
mkdir tmp1/test
chmod 1777 tmp1/test
#
#make a dest directory into which to untar the test dir
mkdir tmp2
#
#tar up the (empty) test dir and untar it into the source dir
tar cf - -C tmp1 . | (cd tmp2; tar xpf -)
#
#list the source and dest dirs
#note the wrong protection on /tmp2/test
ls -l tmp1
ls -l tmp2
#
#leave the test dir in place and repeat the operation.
#note the different (correct) protection on tmp2/dest
tar cf - -C tmp1 . | (cd tmp2; tar xpf -)
ls -l tmp1
ls -l tmp2
#
#remove the test dir
rmdir tmp2/test
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2004-01-22 16:42 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-01-22 16:42 tar and dir attribs T. Horsnell (tsh)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox