"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.
This is the intended behavior. Linking anything to a directory will create a link inside the directory, even with -f.