Bug 136373 - Creating symbolic link broken
Creating symbolic link broken
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: coreutils (Show other bugs)
4.0
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Tim Waugh
David Lawrence
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-10-19 12:13 EDT by Thomas Amsler
Modified: 2007-11-30 17:07 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-10-19 12:23:05 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Thomas Amsler 2004-10-19 12:13:41 EDT
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:
Comment 1 Tim Waugh 2004-10-19 12:23:05 EDT
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.
Comment 2 Thomas Amsler 2004-10-19 12:51:27 EDT
The problem is that the directory was not pre-existing. There wasn't a
tomcat directory prior to creating the symbolic link.
Comment 3 Tim Waugh 2004-10-19 12:53:59 EDT
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.

Note You need to log in before you can comment on or make changes to this bug.