John Bergqvist
2021-Apr-05 12:16 UTC
[Samba] Problem with listing contents of directory of symlinks - not all files shown
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 present. 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.
Rowland penny
2021-Apr-05 12:41 UTC
[Samba] Problem with listing contents of directory of symlinks - not all files shown
On 05/04/2021 13:16, 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". > > It doesn't seem to matter what the original symlinks are are called, or > what the subdirectory in the share is called.Please post your smb.conf Rowland
Jeremy Allison
2021-Apr-05 16:17 UTC
[Samba] Problem with listing contents of directory of symlinks - not all files shown
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 >present. > >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 ! Jeremy.
Ralph Boehme
2021-Apr-06 10:53 UTC
[Samba] Problem with listing contents of directory of symlinks - not all files shown
Am 4/5/21 um 2:16 PM schrieb John Bergqvist via samba:> 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 > present.hm, works for me in master: $ grep '\[test\]' -A 3 /opt/samba/etc/smb.conf [test] path = /srv/samba/test vfs objects = acl_xattr streams_xattr wide links = yes $ ls -l /srv/samba/test/dir/ total 0 lrwxrwxrwx. 1 slow slow 22 Apr 6 12:38 lnk1 -> /home/slow/file $ bin/smbclient -U slow%x //localhost/test -c "ls dir/*" . D 0 Tue Apr 6 12:45:34 2021 .. D 0 Tue Apr 6 12:42:40 2021 lnk1 N 76 Thu Jan 7 15:15:48 2021 102687672 blocks of size 1024. 47535464 blocks available I don't think 4.14 and master have any differences in the relevant code. Can you therefor please provide a better to apply reproducer including your full config? -slow -- Ralph Boehme, Samba Team https://samba.org/ Samba Developer, SerNet GmbH https://sernet.de/en/samba/ GPG-Fingerprint FAE2C6088A24252051C559E4AA1E9B7126399E46 -------------- next part -------------- A non-text attachment was scrubbed... Name: OpenPGP_signature Type: application/pgp-signature Size: 840 bytes Desc: OpenPGP digital signature URL: <http://lists.samba.org/pipermail/samba/attachments/20210406/cb7c7059/OpenPGP_signature.sig>