Subject: Re: bug#29475: filesystem does not allow ln to create bad symbolic link

From: Paul Eggert <[email-masked]>
Date: Mon, 27 Nov 2017 14:37:25 -0800

On 11/27/2017 10:17 AM, [email-masked] wrote:
> $ ln -s not-there badlink
> ln: failed to create symbolic link ‘badlink’: No such file or directory

What happens if you do the following shell command instead?

strace ln -s not-there badlink

On my platform (Fedora 27) the strace output ends this way:

stat("badlink", 0x7ffebc9ddbe0)         = -1 ENOENT (No such file or 
directory)
symlinkat("not-there", AT_FDCWD, "badlink") = 0
lseek(0, 0, SEEK_CUR)                   = -1 ESPIPE (Illegal seek)
close(0)                                = 0
close(1)                                = 0
close(2)                                = 0
exit_group(0)                           = ?

which is expected. What happens on your platform?