Re: With smb1 unix extensions gone, any way to export existing symlinks to Linux clients as symlinks?
Rowland Penny via samba <[email protected]> Mon, 27 Apr 2026 14:42:40 +0100
| Newsgroups | gmane.network.samba.general |
|---|---|
| Message-ID | <[email protected]> |
On Mon, 27 Apr 2026 14:59:00 +0200 "Dr. Thomas Orgis via samba" <[email protected]> wrote: > Am Mon, 27 Apr 2026 11:46:09 +0200 > schrieb Ralph Boehme <[email protected]>: > > > On 4/27/26 10:34 AM, Dr. Thomas Orgis via samba wrote: > > > Or is there some sane way to get read-only 'real' symlinks > > > exported to clients with current samba? > > > > this should just work. Existing symlinks on the server should be > > seen as symlinks by the client (via reparse points on the wire). > > Oh? That would be cool. This means I'm doing something wrong. > > I did not have an option pertaining to that in smb.conf, as the > documentation / info I could find did not suggest that this kind of > read-only symlinks works. Specifically > > follow symlinks (S) > > This parameter allows the Samba administrator to stop smbd(8) from > following symbolic links in a particular share. Setting this > parameter to no prevents any file or directory that is a symbolic > link from being followed (the user will get an error). This option > is very useful to stop users from adding a symbolic link to > /etc/passwd in their home directory for instance. However it will > slow filename lookups down slightly. > > > The 'user will get an error'? Not the link? I now added follow > symlinks = no to my smb.conf: > > [global] > security = user > map to guest = Bad Password > server role = standalone server > smb ports = 1445 > log file = /srv/cernvmfs/smb.log > log level = 0 > follow symlinks = no > > [cvmfs] > path = /srv/cernvmfs/mount > guest ok = yes > read only = yes > > But with that, the link just gets hidden: > > server:~# stat /srv/cernvmfs/mount/hello.txt > File: /srv/cernvmfs/mount/hello.txt > Size: 6 Blocks: 8 IO Block: 4096 regular > file Device: 253,7 Inode: 17563651 Links: 1 > Access: (0644/-rw-r--r--) Uid: ( 0/ root) Gid: ( 0/ > root) Access: 2026-03-15 15:26:39.849351781 +0100 > Modify: 2026-03-15 15:26:17.237719073 +0100 > Change: 2026-03-15 15:26:17.237719073 +0100 > Birth: 2026-03-15 15:26:17.237719073 +0100 > server:~# stat /srv/cernvmfs/mount/hello.link > File: /srv/cernvmfs/mount/hello.link -> hello.txt > Size: 9 Blocks: 0 IO Block: 4096 symbolic > link Device: 253,7 Inode: 17563652 Links: 1 > Access: (0777/lrwxrwxrwx) Uid: ( 0/ root) Gid: ( 0/ > root) Access: 2026-04-27 13:57:37.585419703 +0200 > Modify: 2026-04-27 13:57:36.557433804 +0200 > Change: 2026-04-27 13:57:36.557433804 +0200 > Birth: 2026-04-27 13:57:36.557433804 +0200 > > client:~# stat /cvmfs/hello.txt > File: /cvmfs/hello.txt > Size: 6 Blocks: 8 IO Block: 1048576 regular > file Device: 0,80 Inode: 17563651 Links: 1 > Access: (0755/-rwxr-xr-x) Uid: ( 0/ root) Gid: ( 0/ > root) Access: 2026-03-15 15:26:39.849351700 +0100 > Modify: 2026-03-15 15:26:17.237719000 +0100 > Change: 2026-03-15 15:26:17.237719000 +0100 > Birth: 2026-03-15 15:26:17.237719000 +0100 > > client:~# stat /cvmfs/hello.link > stat: cannot statx '/cvmfs/hello.link': No such file or directory > > client:~# time ls -l /cvmfs > total 4 > drwxr-xr-x 2 root root 0 Aug 29 2014 cms.cern.ch > -rwxr-xr-x 1 root root 6 Mar 15 15:26 hello.txt > > real 0m0.740s > user 0m0.000s > sys 0m0.002s > > (The 'root' on the server is actually an unprivileged user in a > namespace.) > > This is without the respective FUSE filesystem (CernVM-FS) being > involved yet, that is in the subdirectory. > > The smb.conf is this: > > [global] > security = user > map to guest = Bad Password > server role = standalone server > smb ports = 1445 > log file = /srv/cernvmfs/smb.log > log level = 0 > > [cvmfs] > path = /srv/cernvmfs/mount > guest ok = yes > read only = yes > > The cvmfs one is mounted on /cvmfs/ on the clients. > > Is there something else I need to add to make the symlinks show up? > Hm, maybe on the client side. > > client:~# grep cvmfs /proc/mounts > //server/cvmfs /cvmfs smb3 > rw,relatime,vers=3.1.1,cache=strict,username=guest,uid=0,noforceuid,gid=0,noforcegid,addr=172.25.21.182,file_mode=0755,dir_mode=0755,soft,nounix,serverino,mapposix,reparse=nfs,rsize=4194304,wsize=4194304,bsize=1048576,retrans=1,echo_interval=60,actimeo=1,closetimeo=1 > 0 0 > > I do not remember to ask for nounix. I did the mount via > > mount -t smb3 -o user=guest,password=foo,port=1445 > //server/cvmfs cvmfs/ > > But I do see that my smbd/smb.conf doesn't offer posix SMB3.11. But > mfsymlinks gives no error … but also no results. > > I now realize that I do need support for smb3 unix extensions and that > I run smbd 4.17 on Debian 12, wich is simply too old for this, as it > seems. In this scenario … I in fact can still do this: As I thought, your version of Samba is too old, if you do not want to update the entire OS, enable bookworm-backports and Use Samba from there, that will get you to 4.22.6 and smb3 Unix extensions. > > server:~# grep protoc /srv/home/cernvmfs/smb.conf > server min protocol = NT1 > server max protocol = NT1 But do not set 'server max protocol = NT1' doing that would turn off SMB3 (as would 'client max protocol = NT1') Do you have computers running SMB1 that are not capable of anything higher ? Rowland -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba