[Samba] Problem with listing contents of directory of symlinks - not all files shown

Jeremy Allison jra at samba.org
Mon Apr 5 16:17:30 UTC 2021

On Mon, Apr 05, 2021 at 01:16:48PM +0100, John Bergqvist via samba wrote:
>I'm running Samba version 4.14.2 on Arch Linux, and I've observed this
>behaviour only since upgrading today (unfortunately I'm not able to find
>out which version I upgraded from).
>I have a samba share which has wide links & follow symlinks both set to
>"yes" and within that is a file called "Subdir".
>If I cd into Subdir and create a symlink into that directory: "ln -s
>~/file.ts file0.ts"
>Nothing is shown in "Subdir" in any client I use, despite "file0.ts" being
>If I then create another symlink: "ln -s ~/file.ts file1.ts", "file1.ts" is
>then shown in the client.
>If I then create another symlink: "ln -s ~/file.ts file2.ts", both file1
>and file2 are shown, still no file0.
>If I then remove "file0.ts", "file1.ts" now disappears from the client
>(despite still being present on disk and un-touched) and now only
>"file2.ts" is shown.
>If I then re-create the "file0.ts" symlink the same as earlier, the client
>now shows "file0.ts" and "file2.ts". This state persists even after
>restarting the server process and connecting with different clients. I've
>seen this on Windows Clients, Android & smbclient on Arch.
>It doesn't seem to matter what the original symlinks are are called, or
>what the subdirectory in the share is called.

John, can you give me an idiot-proof (I'm the idiot in question :-)
way to reproduce this ?

For example, when you say: "ln -s ~/file.ts file0.ts"
is "~" within the share definition, or outside it ?

Could you make the path explicit (e.g. to something
in /tmp please) so I can track this one down. You could
also create a bug report with the relevent info so we
have everything we need to track.

Thanks !


More information about the samba mailing list