Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site gitpyr.UUCP Path: utzoo!linus!decvax!harpo!whuxlm!akgua!gatech!gitpyr!robert From: robert@gitpyr.UUCP (Robert Viduya) Newsgroups: net.unix-wizards Subject: Re: Need help preserving permissions when using tar? Message-ID: <582@gitpyr.UUCP> Date: Fri, 19-Jul-85 05:39:37 EDT Article-I.D.: gitpyr.582 Posted: Fri Jul 19 05:39:37 1985 Date-Received: Sun, 21-Jul-85 21:12:32 EDT References: <495@men1.UUCP> <2424@sun.uucp> Organization: Georgia Tech, Atlanta Lines: 29 > > Does anyone know of a way to preserve file and directory permissions > > and ownerships when using tar? > > 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. Unfortunately, this is only halfway true. A couple of months ago I was doing some development on a project using RCS. RCS stored all it's files in a subdirectory (called RCS) with all the files set to read-only to everyone (including me). Well, I did a number of archives (update archive, not a full archive) to tape using tar about once a week. When I finished the project, I did one last archive and removed the whole directory off disk. Well, I had to upgrade this project about a month ago and so I started to extract the directory from the tar tape. Tar extracted the first, and oldest copy of the directory and then proceeded to fail with every other copy because it refused to write over a read-only file. I was left with the oldest version of the project. I eventually managed to get the latest version loaded (through the wonders of Berkeley job control), but tar should at least have a flag that tells it to unconditionally reload files regardless of what the permission modes on the disk copy are. robert -- Robert Viduya 01111000 Georgia Institute of Technology ...!{akgua,allegra,amd,hplabs,ihnp4,masscomp,ut-ngp}!gatech!gitpyr!robert ...!{rlgvax,sb1,uf-cgrl,unmvax,ut-sally}!gatech!gitpyr!robert