Symlinks already present

Cameron Simpson cs at cskk.id.au
Tue Sep 1 18:18:21 EDT 2020


On 01Sep2020 18:42, Grant Edwards <grant.b.edwards at gmail.com> wrote:
>On 2020-09-01, Richard Damon <Richard at Damon-Family.org> wrote:
>> Remember, we are talking about a hypothetical OS that handles 
>> hardlinks
>> to directories, and defines that .. will point to the parent used to
>> come to it, NOT just having current *NIX allowing hardlinks to
>> directories with no remediation of the issues cause.
>
>I can testify from personal experience that SunOS 3/4 was in the
>latter category.  After creating a hard-link to a directory, things
>like fsck and the filesystem dump backup utility got very upset and
>confused.  IIRC the only way to recover was to nuke the involved
>inodes then let fsck try to pick up the pieces and put them in the
>lost+found. IIRC, I managed to recover without losing any files, but
>it wasn't a fun day.

IIRC this is very old behaviour indeed, in that when I was using V7 UNIX 
the manual mentioned that only root could make a hard link to a 
directory, and I think there was some allusion to this being how rename 
was done for directories, just like files (no rename OS call, just link 
to new name, unlink old). That would mean "mv" was setuid root at that 
time, which does _not_ ring any bells. So I may be misremembering the 
details.

Cheers,
Cameron Simpson <cs at cskk.id.au>


More information about the Python-list mailing list