Created attachment 16616 [details] Test case script If the first entry created in a shared directory is a symlink, it is not visible to clients. In fact, if a symlink ever becomes the only entry in a directory, it will disappear. An invisible symlink will reappear if it is renamed (and there is at least one other entry in the directory). I'll attach a test case and the result of running it. The same server-side files are shared via Samba and NFS, changes are made via the NFS share, and what the client sees via both shares is shown. I've also included the server's smb.conf. The server is a Raspberry Pi 4b (aarch64) running openSUSE Tumbleweed (20210507 snapshot) and Samba 4.14.4+git.162.18fd73a39a0-1.1. The share is from an XFS file system on the server. The problem has been seen on an x86_64 Tumbleweed laptop, as well as an NVidia Shield.
Created attachment 16617 [details] Test case result
Created attachment 16618 [details] Server's smb.conf
I can't reproduce this with current master code. Is it possible for you to rebuild with master and check ?
Yup, it looks like the issue has been fixed since 4.14.4. I didn't do a lot of testing, but Master sees a single symlink in a directory that the Tumbleweed distribution of Samba does not. In case Tumbleweed's 4.14.4 differs from the official one, I also tried downloading the "samba-4.14.4" tagged source from GitLab, and it also fails. So, I guess the next release will likely be OK, but it appears there is a bug in 4.14.4.
In master, the following commits may be the fix. git show 36a074bb1a23df2bc6e4d6c6b6cfd7023e6ea58d git show 5c3470c0f2937f0a878469f751e868b7e80234d8 git show d590d9130ee28cc0c39d605015f4b5904ba582f5 git show d78964c40b5ca5ee0658c46d492b3dcd6f6b4b94 My money is on the last one. If you can confirm any of these fix the issue for 4.14.x I'll get it back-ported for the next 4.14.x release.
Sorry for the delay. I had to learn more git than I've needed in the past. I believe 5c3470c0f2937f0a878469f751e868b7e80234d8 is the fix, but to make sure, here's an outline of what I did: Set up: git clone https://gitlab.com/samba-team/samba.git ./configure --prefix=/home/dhwalker/NoBackup/Samba/SambaInst --oldincludedir=/home/dhwalker/NoBackup/Samba git switch -c try1 Then I tried the first commit you listed: git checkout 36a074bb1a23df2bc6e4d6c6b6cfd7023e6ea58d I used "make" and "make install" to build, then stopped the running smbd and nmbd, and: cd /home/dhwalker/NoBackup/Samba/SambaInst sudo cp /etc/samba/* etc sudo bin/smbpasswd -a dwmedia sudo sbin/smbd sudo sbin/nmbd This didn't work: "INTERNAL ERROR: cups_pcap_load_async: reinit_after_fork() failed in pid 4753 (4.14.4)". I can provide more detail, but I suspect it doesn't matter. I repeated with the second commit you listed, 5c3470c0f2937f0a878469f751e868b7e80234d8, and that one worked (saw a lone symlink in a directory). I didn't try the other commits you listed, but I can if that'll help.
I doubt that ref is the fix: commit 5c3470c0f2937f0a878469f751e868b7e80234d8 Author: Jeremy Allison <jra@samba.org> Date: Mon Apr 19 16:38:00 2021 -0700 s3: smbd: Prevent fchmod on a symlink. as this only prevents a client operation. d590d9130ee28cc0c39d605015f4b5904ba582f5 and d78964c40b5ca5ee0658c46d492b3dcd6f6b4b94 are much more likely IMHO.
My apologies! I mistakenly was thinking that the list of commits you gave me were in chronological order. Now that I've checked their timestamps, I see they're in reverse chronological order. So, d590d9130ee28cc0c39d605015f4b5904ba582f5 works properly, and d78964c40b5ca5ee0658c46d492b3dcd6f6b4b94 does not, so I think d590d9130ee28cc0c39d605015f4b5904ba582f5 is the fix.
"Yup, it looks like the issue has been fixed since 4.14.4".