On samba-2.2.8a machine alumiguin hubshare # ls /mnt/linuxback/backup/kernel/ linux-2.2.23.tar.bz2 linux-2.4.21.tar.bz2 linux-2.4.25.tar.bz2 linux-2.2.25.tar.bz2 linux-2.4.22.tar.bz2 linux-2.6.3.tar.bz2 linux-2.4.19.tar.bz2 linux-2.4.23.tar.bz2 linux-2.4.20.tar.bz2 linux-2.4.24.tar.bz2 alumiguin hubshare # ln -s /mnt/linuxback/backup/kernel/ symlink alumiguin hubshare # ls -l total 0 lrwxr-xr-x 1 root root 29 Feb 26 20:05 symlink -> /mnt/linuxback/backup/kernel// On client: Squall mnt # mount -t smbfs //10.0.0.2/hubshare liver/ Password: Squall mnt # ll liver/ total 4.0K drwxr-xr-x 1 root root 4.0K Feb 26 20:05 symlink Squall mnt # ls liver/symlink/ linux-2.2.23.tar.bz2 linux-2.4.21.tar.bz2 linux-2.4.25.tar.bz2 linux-2.2.25.tar.bz2 linux-2.4.22.tar.bz2 linux-2.6.3.tar.bz2 linux-2.4.19.tar.bz2 linux-2.4.23.tar.bz2 linux-2.4.20.tar.bz2 linux-2.4.24.tar.bz2 On samba-3.0.2a server: Squall dchub # ls /mnt/wd250/games/ UT2004-BetaDemo.exe Squall dchub # ln -s /mnt/wd250/games/ . Squall dchub # ls -l total 0 lrwxrwxrwx 1 root root 17 Feb 26 20:14 games -> /mnt/wd250/games/ on client: alumiguin mnt # mount -t smbfs //10.0.0.1/dchub -o username=liverbugg test Password: alumiguin mnt # ls -l test/ total 0 lrwxrwxrwx 1 root root 17 Feb 26 20:14 games -> /mnt/wd250/games/ alumiguin mnt # ls test/games/ ls: test/games/: No such file or directory These machines have basicly the same smb.conf with follow symlinks = yes. If I go to either share with a windows client the symlinks are followed properly. Reproducible: Always Steps to Reproduce: 1. make a share w/ symlinks on a samba3 server 2. mount it on a samba 2 client Actual Results: dir contains actual symlinks that aren't valid on the client Expected Results: dir contains directories emerge info of samba2 host: Portage 2.0.49-r20 (default-1.0, gcc-2.95.3, glibc-2.2.5-r9, 2.6.3-gentoo-r1) ================================================================= System uname: 2.6.3-gentoo-r1 i686 AMD Athlon(tm) Gentoo Base System version 1.4.3.13 ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CFLAGS="-march=i686 -O3 -pipe" CHOST="i686-pc-linux-gnu" COMPILER="" CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d" CXXFLAGS="-march=i686 -O3 -pipe" DISTDIR="/mnt/portage/portage/distfiles" FEATURES="autoaddcvs ccache digest sandbox strict userpriv usersandbox" GENTOO_MIRRORS="http://mirror.clarkson.edu/pub/distributions/gentoo/ ftp://gentoo.mirrors.pair.com/ ftp://ftp.ussg.iu.edu/pub/linux/gentoo http://gentoo.oregonstate.edu http://www.ibiblio.org/pub/Linux/distributions/gentoo" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/mnt/portage/tmp" PORTDIR="/mnt/portage/portage" PORTDIR_OVERLAY="/mnt/portage/portage-local" SYNC="rsync://rsync.us.gentoo.org/gentoo-portage" USE="3dnow X alsa apm avi berkdb bonobo cdr crypt cups directfb dvd encode esd gdbm ggi gif gnome gnome-libs gpm gtk gtk2 gtkhtml guile imlib jpeg libg++ libwww mikmod mmx motif mozilla mpeg ncurses oggvorbis opengl oss pam pdflib perl png python readline sdl slang snmp spell ssl svga tcltk tcpd tiff truetype x86 xml2 xmms xv" emerge info of samba3 host Portage 2.0.50-r1 (default-amd64-2004.0, gcc-3.3.3, glibc-2.3.3_pre20040207-r0, 2.6.1-gentoo) ================================================================= System uname: 2.6.1-gentoo x86_64 5 Gentoo Base System version 1.4.3.13 distcc 2.12.1 x86_64-pc-linux-gnu (protocols 1 and 2) (default port 3632) [enabled] Autoconf: sys-devel/autoconf-2.59-r3 Automake: sys-devel/automake-1.8.2 ACCEPT_KEYWORDS="amd64 ~amd64" AUTOCLEAN="yes" CFLAGS="-O3 -pipe" CHOST="x86_64-pc-linux-gnu" COMPILER="gcc3" CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d" CXXFLAGS="-O3 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs ccache digest distcc sandbox" GENTOO_MIRRORS="http://gentoo.oregonstate.edu http://distro.ibiblio.org/pub/Linux/distributions/gentoo" MAKEOPTS="-j3" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="X aalib amd64 apm avi berkdb crypt encode esd foomaticdb gdbm gif gpm gtk gtk2 imlib jpeg libg++ libwww mikmod motif mozilla mpeg multilib ncurses nls oggvorbis opengl oss pam pdflib perl png python quicktime readline sdl slang spell ssl tcpd threads truetype xml2 xmms xv zlib"
Just updated the samba2 machine to samba3 and now it's shares show up as symlinks instead of directories. After more expirementaion using my laptop, I found that when the client is running a 2.4 kernel the symlinks are followed with any samba version on the server. But when the client is running a 2.6 kernel, the symlinks show up as symlinks on a samba3 server but are correctly followed on a samba2 server. Laptop has gentoo-dev-sources-2.6.1-r1 and ck-sources-2.4.24-r1 and samba-3.0.2a
just add unix extensions = no to global section of smb.conf!
It seems this will be fixed in the upcoming samba release: Beginning with Samba 3.0.5pre1, clients supporting the UNIX extensions to the CIFS protocol can create symlinks to absolute paths which will be **followed** by the server. This functionality has been requested in order to correctly support certain applications when the user's home directory is mounted using some type of CIFS client (e.g. the cifsvfs in the Linux 2.6 kernel). If this behavior is not acceptable for your production environment you can set 'wide links = no' in the specific share declaration in the server's smb.conf. Be aware that disabling wide link support out of a share in Samba may impact the server's performance due to the fact that smbd will now have to check each path additional times before traversing it.