Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!ames!ucsd!ucsdhub!hp-sdd!hplabs!hpda!hp-sde!hpfcdc!rml From: rml@hpfcdc.HP.COM (Bob Lenk) Newsgroups: comp.sys.hp Subject: Re: bug in hp nfs (or tar) Message-ID: <5570047@hpfcdc.HP.COM> Date: 27 May 88 22:32:25 GMT References: <12780@joyce.istc.sri.com> Organization: HP Ft. Collins, Co. Lines: 29 a: sun hardware, file on sun via nfs. b: hp hardware, file on hp disk. c: sun hardware, file on hp via nfs. This seems to be related to System V compatibility using chown(2). System V permits the owner of a file to give it away, while BSD systems (including Sun) restrict this to the superuser. Thus on System V (and compatible systems like HP-UX), the "p" option to tar does a chown for any user (as documented). On BSD systems it only overrides the umask while restoring file permissions. Given this capability, I think System V tar orders the operations so the directory is written first, its time and permissions are modified second, at it is chown'd last. From result (c), Sun's tar apparently assumes chown(2) will only work for superuser, (which is not true on a heterogeneous network), and thus doesn't order operations and assumes it will fail for mortal users. Dropping the "p" option should give you what you want. For a 100% solution do a umask 0 first if that's not your default (and restore it afterwards). HP-UX will also let the administrator restrict chown to superuser (equivalent to BSD and Sun) with setprivgrp(1m). I haven't tried this, but it would probably give you the expected behavior with (c) but warning messages with (b). Bob Lenk {ihnp4, hplabs}!hpfcla!rml rml%hpfcla@hplabs.hp.com