Need help preserving permissions when using tar?
Robert Viduya
robert at gitpyr.UUCP
Fri Jul 19 19:39:37 AEST 1985
> > 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
More information about the Comp.unix.wizards
mailing list