> Well, OK, now I am really confused. So what should we be bound to? To > the POLA (old GNU tar in 4.6-release and downward was not fully > preserving permissions unless -p is specified, even when invoked by > root)? Or to what other systems do? Bruce, what do you think?
Okay, I did some more research and now I am sorry I got involved! In addition to SUN, SGI says -p (restore permissions) is the default when run as super-user. HPUX says the same thing. Further it says it conforms to SVID2, SVID3, XPG2, XPG3 (I don't know if this is just boiler plate or actual conformance -- I don't have the standards). Ultrix is not clear. Version 7 tar(1) man page is not entirely clear about this. I checked out the earliest version of tar from FreeBSD cvs and that indeed does not default to -p for the superuser. my guess is John Gilmore originally created gnu tar from reading of the man page. If so, that would explain the difference. I don't have the V7 sources so can't check but given that companies with the Unix licence (and the orig. sources) all do the same I believe the V7 man page just missed out some details. I don't know what POSIX says. {Net,Open}BSD & Linux do what gnu tar does. If it were upto me I'd choose what POSIX says. If it is ambiguous and doesn't clearly specify the super user case, I'd choose -p to be the default for root since a usability point of view I really don't see the point of respecting umask while extracting an archive -- a weird umask can produce some very surprising results! But clearly, for portability one should always specify -p even as root and scripts using tar should be fixed! To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message