I've tried this on 2 different systems, and on both systems ln -s fails in the same way.
Here's the steps
mkdir Test cd Test
afile
cd .. ln -s Test/afile Test/afile2 ls -l Test
This is the output: /bin/ls: cannot access Test/afile2: No such file or directory total 0 -rw-rw-r--. 1 pgaltieri pgaltieri 0 Aug 24 13:46 afile l?????????? ? ? ? ? ? afile2
cd Test ln -s afile afile3 ls -l
This is the output: total 0 -rw-rw-r--. 1 pgaltieri pgaltieri 0 Aug 24 13:46 afile l?????????? ? ? ? ? ? afile2 -rw-rw-r--. 1 pgaltieri pgaltieri 0 Aug 24 13:46 afile3
ln -s Test/afile afile4 ls -l afile4
This is the output: -rw-rw-r--. 1 pgaltieri pgaltieri 0 Aug 24 13:46 afile4
The problem occurs only if the destination is in a directory.
This issue came up when trying to setup radiusd. The README.rst says
$ cd raddb $ ln -s mods-available/foo mods-enabled/foo
When I tried this as root I got the strange ln behaviour, but the problem is not user specific. Anyone else seeing this? Is this a bug?
Any help is appreciated.
Paolo