Bug 23864 - The "-f" option of "ln" fails with directories
The "-f" option of "ln" fails with directories
Status: CLOSED NOTABUG
Product: Red Hat Linux
Classification: Retired
Component: fileutils (Show other bugs)
7.0
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Bernhard Rosenkraenzer
Aaron Brown
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-01-12 04:08 EST by cradford
Modified: 2007-04-18 12:30 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2001-01-12 04:08:57 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description cradford 2001-01-12 04:08:25 EST
"ln -fs" fails when applied to directories (both hard & soft link work for 
files, user privelidge make no difference).
drwxr-xr-x    2 root     root         4096 Jan 12 08:39 one
drwxr-xr-x    2 root     root         4096 Jan 12 08:39 two
[root@linus pu]# ln -s one ug
[root@linus pu]# ls -l
total 8
drwxr-xr-x    2 root     root         4096 Jan 12 08:39 one
drwxr-xr-x    2 root     root         4096 Jan 12 08:39 two
lrwxrwxrwx    1 root     root            3 Jan 12 08:40 ug -> one
[root@linus pu]# ln -fs two ug
[root@linus pu]# ls -l
total 8
drwxr-xr-x    2 root     root         4096 Jan 12 08:40 one
drwxr-xr-x    2 root     root         4096 Jan 12 08:39 two
lrwxrwxrwx    1 root     root            3 Jan 12 08:40 ug -> one
[root@linus pu]# ls -l one
total 0
lrwxrwxrwx    1 root     root            3 Jan 12 08:40 two -> two

root@linus pu]# rpm -qif /bin/ln
Name        : fileutils                    Relocations: (not relocateable)
Version     : 4.0x                              Vendor: Red Hat, Inc.
Release     : 3                             Build Date: Fri 25 Aug 2000 
02:24:18 PM GMT
Install date: Thu 16 Nov 2000 11:12:34 AM GMT      Build Host: 
porky.devel.redhat.com
Group       : Applications/File             Source RPM: fileutils-4.0x-
3.src.rpm
Size        : 1905548                          License: GPL
Packager    : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>
Summary     : The GNU versions of common file management utilities.
Comment 1 Bernhard Rosenkraenzer 2001-01-12 06:09:41 EST
This is the intended behavior. Linking anything to a directory will create a
link inside the directory, even with -f.

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