bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Paul Eggert
Subject: bug#29475: filesystem does not allow ln to create bad symbolic link
Date: Mon, 27 Nov 2017 18:41:12 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0

address@hidden wrote:
stat("badlink", 0x7ffc0eb805a0)         = -1 ENOENT (No such file or directory)
symlink("not-there", "badlink")         = -1 ENOENT (No such file or directory)

My guess is that you've removed the working directory somehow, or are on a buggy filesystem that thinks the working directory has been removed. I can reproduce the situation as follows on Ubuntu 16.04.3:

$ cd /tmp
$ mkdir d
$ cd d
$ rmdir /tmp/d
$ LC_ALL=C strace ln -s a b
...
stat("b", 0x7fffe6df6140)               = -1 ENOENT (No such file or directory)
symlink("a", "b")                       = -1 ENOENT (No such file or directory)
...

The only suggestion I have is "don't do that". If memory serves, POSIX doesn't specify the behavior in this case.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]