Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84 SMI; site sun.uucp Path: utzoo!watmath!clyde!burl!ulysses!ucbvax!decvax!decwrl!sun!guy From: guy@sun.uucp (Guy Harris) Newsgroups: net.unix-wizards Subject: Re: Need help preserving permissions when using tar? Message-ID: <2430@sun.uucp> Date: Wed, 17-Jul-85 04:10:25 EDT Article-I.D.: sun.2430 Posted: Wed Jul 17 04:10:25 1985 Date-Received: Fri, 19-Jul-85 01:36:35 EDT References: <495@men1.UUCP> <2424@sun.uucp> Organization: Sun Microsystems, Inc. Lines: 21 > The tar in 4.2bsd (and maybe other Berkeley releases) puts directory > permissions into the tar file and creates the directories with those > permissions when you read the tar file. It only creates the directories with those permissions if you use the "p" flag when reading the tape in. (It creates files with the permissions from the tape under all circumstances, but it proceeds to change the mode of the file from the mode it was created with to the very same mode if you specify the "p" flag! To add a bit of confusion, the System V Release 2 "tar" has an "o" flag - conflicting, alas, with the Berkeley "o" flag which tells it *not* to put directories on the tape - which tells it not to change the owner and group owner of the files to the values from the tape. I guess this wasn't in V7 because only the super-user can change the ownership of a file. The only reason I can assume for why it wasn't changed in the first USG release it was on is that none of the people using USG releases use "tar" - they use "cpio" instead. Having all files read in from a "tar" (or "cpio"!) file from another site owned by whatever random users have the same numeric user ID as the owner of the file at that site gets old *real* quickly... Guy Harris