[Samba] Empty folder deletion issue - Samba 4.15 thru 4.18

CaptainTrips28 captaintrips28 at gmail.com
Wed Mar 15 15:29:10 UTC 2023


Encountering a strange one... has been occuring since samba 4.15.x and
continues to occur even in 4.17.5 and 4.18

Issue does not occur in earlier versions (4.13.x) and have switched back
and forth between versions to confirm.

Servers are winbind joined, PAM and krb5 auth, all seems to work fine
(reading, writing, creating, moving) until trying to delete an empty folder
on the share from Windows client. Folder briefly disappears, but then
reappears once refreshed. I've confirmed no attributes set,
files/subfolders or hidden files are in the folder. Age of the folder
doesn't matter, new empty folders, old empty folders... issue occurs on
them regardless.

Servers are all various RHEL releases, version 7.9, 8.4 and 8.6. Issue
occurs regardless if RHEL repo samba packages 4.15.x or Samba source builds
(4.17.5 or 4.18). I did originally open a ticket with Redhat but they
simply suggested it was a bug since it doesn't occur with samba 4.13.x and
passed it onto their engineering team (haven't heard any follow-up in
months since opening that ticket)

All I can find is a rmdir_internal related error in the logs:

"""""""
[2023/03/15 10:59:21.285508, 10, pid=8606, effective(1617208032,
1617207642), real(1617208032, 0)]
../../source3/smbd/files.c:528(openat_pathref_fullname)

  openat_pathref_fullname: fsp [wrk/anly/testfolder/New folder]: OK

[2023/03/15 10:59:21.285573,  3, pid=8606, effective(1617208032,
1617207642), real(1617208032, 0)]
../../source3/smbd/close.c:1134(rmdir_internals)

  rmdir_internals: couldn't remove directory wrk/anly/testfolder/New
folder/New folder2 : Invalid argument

[2023/03/15 10:59:21.285596,  5, pid=8606, effective(1617208032,
1617207642), real(1617208032, 0)] ../../source3/smbd/files.c:1814(file_free)

  file_free: freed files structure 0 (3 used)

[2023/03/15 10:59:21.285611,  5, pid=8606, effective(1617208032,
1617207642), real(1617208032, 0)]
../../source3/smbd/close.c:1573(close_directory)

  close_directory: wrk/anly/testfolder/New folder/New folder2. Delete on
close was set - deleting directory returned NT_STATUS_INVALID_PARAMETER.
""""""



Any help/suggestions greatly appreciated.


More information about the samba mailing list