From Bugzilla Helper: User-Agent: Mozilla/5.0 (X11; U; Linux i686; rv:1.7.3) Gecko/20041001 Firefox/0.10.1 Description of problem: When creating a symbolic link "ln -s file-name sym-link-name" it doesn't create a directory but rather a directory. Please see example output below, where I tried to create euler# ln -s jakarta-tomcat-5.0.28 tomcat euler# ls eclipse jakarta-tomcat-5.0.28 maven thunderbird firefox-installer jakarta-tomcat-5.0.28.tar.gz maven-1.0 tomcat euler# ll total 10564 drwxrwxr-x 8 thomas thomas 12288 Oct 19 08:44 . drwx------ 42 thomas thomas 4096 Oct 19 08:44 .. drwxrwxr-x 6 thomas thomas 4096 Oct 14 08:23 eclipse drwxr-xr-x 12 thomas thomas 4096 Oct 12 08:35 firefox-installer drwxrwxr-x 11 thomas thomas 4096 Oct 19 08:44 jakarta-tomcat-5.0.28 -rw-rw-r-- 1 thomas thomas 10718313 Oct 15 13:50 jakarta-tomcat-5.0.28.tar.gz lrwxrwxrwx 1 thomas thomas 9 Oct 18 15:18 maven -> maven-1.0 drwxr-xr-x 5 thomas thomas 4096 Jul 13 06:20 maven-1.0 drwxr-xr-x 10 thomas thomas 4096 Sep 13 05:43 thunderbird drwxrwxr-x 3 thomas thomas 4096 Oct 19 08:45 tomcat euler# ll tomcat/ total 36 drwxrwxr-x 3 thomas thomas 4096 Oct 19 08:45 . drwxrwxr-x 8 thomas thomas 12288 Oct 19 08:44 .. lrwxrwxrwx 1 thomas thomas 21 Oct 19 08:45 jakarta-tomcat-5.0.28 -> jakarta-tomcat-5.0.28 drwxrwxr-x 3 thomas thomas 4096 Oct 19 08:44 work Version-Release number of selected component (if applicable): How reproducible: Sometimes Steps to Reproduce: 1. ln -s FileName SymLinkFileName 2. 3. Actual Results: It creates a folder instead a symbolik link. That folder always contains a symlink with the original file name as well another directory called work. e.g ln -s test symtest ls -la symtest: test -> test work Expected Results: It should just create a symbolic link: ln -s test symtest ls -la symtest symtest -> test Additional info:
The directory was pre-existing. 'ln' doesn't create directories, but if you specify a directory as the target it will create the symlink inside it. It's doing exactly what you asked it to do.
The problem is that the directory was not pre-existing. There wasn't a tomcat directory prior to creating the symbolic link.
Please try the following shell script: rm -rf /tmp/arena mkdir -p /tmp/arena cd /tmp/arena touch foo ln -s foo link ls -l link If it shows a directory, please re-open this bug report.