07.06.2024 20:52, Jeremy Allison wrote:
> Fair enough. Can you post a minimal smb.conf and directory
> setup that reproduces the problem and how to demo it with smbclient
> command lines please ? I know I'm asking to be spoon-fed but my time
for
> Samba these days is quite limited and this would aid immensely
> in creating a properly tested fix.
You're not asking to be spoon-feeding. Because the thing turned out to be
tricky. This is why it took so long for me to create a small reproducer, -
initially I found out that turning off wide links triggers this issue.
However, it turned out to be insufficient alone. And especially tricky to
me was another parameter which is also necessary. Actually two, but one
of them is something I haven't tried for a long time here, because it is
set by samba implicitly already.
# testparm
Load smb config files from /etc/samba/smb.conf
Loaded services file OK.
Weak crypto is allowed by GnuTLS (e.g. NTLM as a compatibility fallback)
Server role: ROLE_STANDALONE
Press enter to see a dump of your service definitions
# Global parameters
[global]
server role = standalone server
smb1 unix extensions = No
usershare max shares = 0
idmap config * : backend = tdb
wide links = Yes
[tst]
msdfs root = Yes
path = /home/mjt
$ smbclient //localhost/tst
Password for [WORKGROUP\mjt]:
Try "help" to get a list of possible commands.
smb: \> cd X
cd \X\: NT_STATUS_OBJECT_NAME_NOT_FOUND
smb: \> dir
x D 0 Fri Jun 7 13:48:45 2024
For this to break, it needs 3 things. Not one, not two, but three.
[global]
wide links = yes
unix extensions = no
[tst]
msdfs root = yes
The unix extension here is especially interesting. According to the
docs, once wide links are enabled, unix extensions are automatically
disabled. This is confirmed by testparam, - even if I omit unix
extension setting, it is listed as disabled by testparam. HOWEVER,
samba becomes case-sensitive only when unix extensions are EXPLICITLY
disabled too, in addition to enabling wide links. And msdfs root is
also needed.
testparam output is the same no matter if unix extensions is explicitly
disabled, but the problem only happens when it is disabled explicitly.
So this one is rather interesting, - definitely not spoon-feeding, it
took me quite some fun to find the right combination :) It's a good
one.
Thanks,
/mjt
--
GPG Key transition (from rsa2048 to rsa4096) since 2024-04-24.
New key: rsa4096/61AD3D98ECDF2C8E 9D8B E14E 3F2A 9DD7 9199 28F1 61AD 3D98 ECDF
2C8E
Old key: rsa2048/457CE0A0804465C5 6EE1 95D1 886E 8FFB 810D 4324 457C E0A0 8044
65C5
Transition statement: http://www.corpit.ru/mjt/gpg-transition-2024.txt