From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "T. Horsnell \(tsh\)" Newsgroups: gmane.os.tru64.managers Subject: tar and dir attribs Date: Thu, 22 Jan 2004 16:42:08 +0000 (GMT) Sender: tru64-unix-managers-owner@ornl.gov Message-ID: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1074789763 22543 80.91.224.253 (22 Jan 2004 16:42:43 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 22 Jan 2004 16:42:43 +0000 (UTC) Original-X-From: tru64-unix-managers-owner-gotm-tru64-unix-managers=m.gmane.org@sws1.ctd.ornl.gov Thu Jan 22 17:42:34 2004 Return-path: Original-Received: from sws1.ornl.gov ([160.91.1.101]) by deer.gmane.org with smtp (Exim 3.35 #1 (Debian)) id 1Ajhuc-0008SN-00 for ; Thu, 22 Jan 2004 17:42:34 +0100 Original-Received: (qmail 6031 invoked by uid 5); 22 Jan 2004 16:42:25 -0000 Original-Followup-To: poster Precedence: bulk Original-Received: (qmail 6016 invoked by uid 49493); 22 Jan 2004 16:42:25 -0000 Original-Received: from tsh@mrc-lmb.cam.ac.uk by sws1 by uid 49491 with qmail-scanner-1.16 (iscan: v3.1/v5.600-1011/622/49252. clamscan: 20030605. spamassassin: 2.55. Clear:SA:0(-4.7/5.0):. Processed in 0.906921 secs); 22 Jan 2004 16:42:25 -0000 Original-Received: from unknown (HELO emroute2.cind.ornl.gov) (160.91.86.17) by 0 with SMTP; 22 Jan 2004 16:42:24 -0000 Original-Received: from emroute2.cind.ornl.gov (LOCALHOST [127.0.0.1]) by emroute2.cind.ornl.gov (PMDF V6.2-X17 #30669) with ESMTP id <0HRW00355H2LDE@emroute2.cind.ornl.gov> for tru64-unix-managers@sws1.ctd.ornl.gov (ORCPT tru64-unix-managers@ornl.gov) ; Thu, 22 Jan 2004 11:42:24 -0500 (EST) Original-Received: from purple.csi.cam.ac.uk (purple.csi.cam.ac.uk [131.111.8.4]) by emroute2.cind.ornl.gov (PMDF V6.2-X17 #30669) with ESMTP id <0HRW00I6VH2JY0@emroute2.cind.ornl.gov> for tru64-unix-managers@sws1.ctd.ornl.gov (ORCPT tru64-unix-managers@ornl.gov) ; Thu, 22 Jan 2004 11:42:20 -0500 (EST) Original-Received: from server1.mrc-lmb.cam.ac.uk ([131.111.85.23]) by purple.csi.cam.ac.uk with esmtp (Exim 4.20) id 1AjhuF-0002f3-5t for tru64-unix-managers@ornl.gov; Thu, 22 Jan 2004 16:42:11 +0000 Original-Received: from alf1.lmb.internal ([10.1.0.1]) by server1.mrc-lmb.cam.ac.uk with esmtp (Exim 4.10) id 1AjhuC-0000ga-00 for tru64-unix-managers@ornl.gov; Thu, 22 Jan 2004 16:42:08 +0000 Original-Received: from tsh by alf1.lmb.internal with local (Exim 4.30) id 1AjhuC-001ioQ-Nt for tru64-unix-managers@ornl.gov; Thu, 22 Jan 2004 16:42:08 +0000 Original-To: Managers X-Mailer: ELM [version 2.4ME+ PL66 (25)] X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ X-Cam-AntiVirus: No virus found X-Cam-SpamDetails: Not scanned Xref: main.gmane.org gmane.os.tru64.managers:6269 X-Report-Spam: http://spam.gmane.org/gmane.os.tru64.managers:6269 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