Bug 15843 - macOS Finder client DFS broken on 4.22.0
Summary: macOS Finder client DFS broken on 4.22.0
Status: NEW
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: File services (show other bugs)
Version: 4.22.0
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Samba QA Contact
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-04-03 20:47 UTC by Harry Youd
Modified: 2025-04-03 20:48 UTC (History)
0 users

See Also:


Attachments
Screenshot of macOS finder view of DFS root on samba server 4.22.0 (346.07 KB, image/png)
2025-04-03 20:47 UTC, Harry Youd
no flags Details
Screenshot of macOS finder view of DFS root on samba server 4.21.4 (175.20 KB, image/png)
2025-04-03 20:48 UTC, Harry Youd
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Harry Youd 2025-04-03 20:47:20 UTC
Created attachment 18626 [details]
Screenshot of macOS finder view of DFS root on samba server 4.22.0

I run Arch Linux on my home server that uses samba for a SMB share. I use a DFS root using the "msdfs:..." symlinks, which is configured in smb.conf. This has been working up until version 4.22.0.

Starting in version 4.22.0, I am unable to access the DFS shares from macOS finder (15.3.2). It successfully enumerates the contents of the DFS root, but shows broken "shortcut" icons against the subdirectories. When attempting to enter a share from the DFS root, an error popup says "The operation can't be completed because the original item for "Downloads" can't be found". smbclient on Linux successfully navigates the DFS shares without change.
 
I have bisected and it appears to be due to this commit https://github.com/samba-team/samba/commit/4a46c6a88273ea765b142299d6cf33d5ec93588. I'm not sure how to proceed from here. I felt a merge request reverting this would be premature as I'm not super sure on the details of what this change is doing. I should have mentioned that the client in question is macOS 15.3.2 finder, but the DFS seems to still work using smbclient on linux.
 
DFS setup:
$ ls -alh /mnt/media/samba/shares/
total 40K
drwxr-xr-x 1 root root 188 Mar 27 21:26  .
drwxr-xr-x 1 root root  12 Jul 26  2022  ..
lrwxrwxrwx 1 root root  45 Jul 26  2022  Audiobooks -> 'msdfs:fqdn\audiobooks$'
lrwxrwxrwx 1 root root  44 Jul 26  2022  Downloads -> 'msdfs:fqdn\downloads$'
 
Relevant parts of smb.conf:

[global]
    workgroup = WORKGROUP
    server string = File Server
    server role = standalone server
    hosts allow = 10.113.210. 10.113.211. 10.26.26.
    host msdfs = yes
    map to guest = Bad User
    guest account = nobody
    logging = systemd
    log level = 2
    ntlm auth = true
    allow insecure wide links = yes
[shares]
    comment = Shares
    msdfs root = yes
    path = /mnt/media/samba/shares
    guest ok = yes
    public = yes
    writable = no
    printable = no
[downloads$]
    comment = Downloads in-progress or seeding
    path = /mnt/media/downloads
    force group = media
    writable = no
    printable = no
    valid users = harry
    force directory mode = 2770
    force create mode = 0770
[audiobooks$]
    comment = Audiobook library
    path = /mnt/media/audiobooks
    force group = media
    writable = no
    printable = no
    valid users = harry
    force directory mode = 2770
    force create mode = 0770

Example of smbclient working:

$ smbclient //fqdn.of.server/shares
Password for [WORKGROUP\harry]:
Try "help" to get a list of possible commands.
smb: \> cd Downloads\
smb: \Downloads\> ls
  .                                   D        0  Fri Mar 28 00:26:34 2025
  ..                                  D        0  Fri Mar 28 00:26:34 2025
  dropzone                            D        0  Fri Mar 28 00:05:00 2025
  temp                                D        0  Fri Mar 28 00:25:38 2025


macOS smbutil dfs
$ smbutil dfs smb://fqdn.of.server/shares/Downloads

No server entries found

------------- Entry 1  -------------
Referral requested : /fqdn.of.server/shares/Downloads
     list item 1 : Path: /fqdn.of.server/shares/Downloads
     list item 1 : Network Address: /fqdn.of.server/downloads$
     list item 1 : New Referral: /fqdn.of.server/downloads$
Comment 1 Harry Youd 2025-04-03 20:48:04 UTC
Created attachment 18627 [details]
Screenshot of macOS finder view of DFS root on samba server 4.21.4