Need help preserving permissions when using tar?

Mats Wichmann mats at dual.UUCP
Tue Jul 30 01:24:55 AEST 1985


> 
> That's because the "chown" system call is privileged in V7 and 4.xBSD and
> "tar" doesn't run set-UID "root".  Be grateful; the "tar" in System III will
> set ownerships under any circumstances because the "chown" system call isn't
> privileged.  This is lousy because you may have gotten a "tar" tape from
> another site, and you really don't want the files owned by whatever random
> person has the same user ID as the person who owned the files on the
> original machine.  The System V "tar" has a "o" flag (which, alas, conflicts
> with the 4.xBSD "tar"s "o" flag, which tells it not to put directory
> information on the tape) that tells it not to change the ownership of files.
> 
> 	Guy Harris

The sensible thing to do on Sys V seems to be to modify tar so
that only root gives files away, since only root is likely to
be loading tapes with stuff to be owned by someone else.
(Whaddaya mean, not everyone has the source?)

Mats Wichmann



More information about the Comp.unix.wizards mailing list