Bug in mv command of SunOS 4

Steve Rumsby steve%maths.warwick.ac.uk at nss.cs.ucl.ac.uk
Tue Mar 14 23:55:33 AEST 1989


In Sun-Spots Digest, v7n177 Jonathan Sweedler writes:

About mv not checking that it can remove the file before renaming it by a
link/unlink, and thus ending up with two link to a file plus the "rename:
Not owner" error message.

This has been mentioned before in the context of doing this to
directories, where you end up with extraneous hard links to directories.
This is not good!  Anyway it is, I think, a problem with the rename system
call, not with mv itself.

[[ Yes, it is a bug with rename(2).  --wnl ]]

Then wnl adds:
> Yes.  This is not a bug.  This is a new feature that is also found in
> 4.3BSD.  See v7n108, v7n124 and v7n128.  The directory you were doing this
> in must have had the "sticky" bit set.  Read the manual page "sticky(8)"
> and "chmod(2)".  --wnl

Well, the "directories with sticky bit" is certainly a feature, but the
above mentioned behaviour of mv is definitely a bug. Also this doesn't
seem to happen on the 4.3 systems around here, and I don't remember fixing
it. I could be wrong about that though.

[[ Okay.  I must not have fully understood his problem.  --wnl ]]

	STeve.

--
UUCP:	 ...!ukc!warwick!steve		Internet: steve at maths.warwick.ac.uk
JANET:	 steve at uk.ac.warwick.maths	PHONE:	 +44 203 523523 x2657



More information about the Comp.sys.sun mailing list