Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.csd.uwm.edu!cs.utexas.edu!romp!d75!awdprime!greenber.austin.ibm.com!glenn From: glenn@greenber.austin.ibm.com (Glenn Zazulia) Newsgroups: comp.unix.wizards Subject: Re: rename strangeness, a possible bug Summary: Not a bug, an undocumented "feature" Message-ID: <610@awdprime.UUCP> Date: 28 Aug 89 23:58:31 GMT References: <24612@santra.UUCP> Sender: news@awdprime.UUCP Reply-To: glenn@awdprime.austin.ibm.com.UUCP (Glenn Zazulia) Organization: IBM AWD, Austin, TX Lines: 23 In article <24612@santra.UUCP> jkp@cs.HUT.FI (Jyrki Kuoppala) writes: >drwxrwxr-x 4 root staff 512 Aug 25 01:04 ./ >drwxr-xr-x 6 nobody wheel 512 Aug 23 23:33 ../ >drwxr-xr-x 2 haa staff 512 Aug 24 16:32 OS-hd-fix/ >drwxrwxr-x 4 jkp staff 512 Aug 25 01:04 local/ > > ... > >According to the documentation (rename(2) and mv(1)) there's no reason >the `mv OS-hd-fix local' shouldn't work. This seems like a bug. > When rename()ing a directory to a different parent directory, it is necessary to have write permission of the directory that is being moved. The reason is that the ".." entry in the directory being renamed needs to be modified to point to the new parent directory. This is one of the few instances when the process needs write access to the file being renamed, and I have never seen this fact documented. Glenn Zazulia >> This .signature intentionally left blank <<