Created attachment 18239 [details] level 10 logfile Since Samba 4.18 the removal of a symlink, which points to a directory, fails with NT_STATUS_OBJECT_NAME_NOT_FOUND. With 4.17.12 it's working. The share definition on a basic fileserver is: [share] path = /share read only = No The content on the filesystem looks like: root@dm9:~# ls -l /share total 4 drwxr-xr-x 2 TEMP\bb TEMP\domain users 4096 Jan 30 20:36 destdir lrwxrwxrwx 1 TEMP\bb TEMP\domain users 7 Jan 30 20:05 link_to_destdir -> destdir Failing command via smbclient: smb: \> ls . D 0 Tue Jan 30 20:53:18 2024 .. D 0 Tue Jan 30 20:53:18 2024 destdir D 0 Tue Jan 30 20:36:42 2024 link_to_destdir D 0 Tue Jan 30 20:36:42 2024 29801344 blocks of size 1024. 26055728 blocks available smb: \> rmdir link_to_destdir NT_STATUS_OBJECT_NAME_NOT_FOUND removing remote directory file \link_to_destdir The attached logfile line 3504 shows that the smbd tries to chdir "share" instead of "/share" which fails with "No such file or directory". strace shows the same: chdir("share") = -1 ENOENT (No such file or directory) The issue is the same if the files are not placed in the share root. Renaming the symlink is working. Symlinks to files can be removed successfully.
Can you please check if this is by chance already fixed by the patches from bug 15549.
(In reply to Ralph Böhme from comment #1) Yes, I confirm, that the fix from bug 15549 solves this issue, too.