the below steps have helped me resolve this exact issue on a number of occasions:
- Login to the samba server.
- Run a “smbstatus”.
- Find the pid of the process that has the lock on the file
in the third section of the output. - Verify that it matches the expected user and hostname
in the first and second sections of the smbstatus output. - Run “ps -ef” and see how long the smbd with that pid has
been running. - If it has been running since before the computer was last
rebooted, it’s a left over smbd. Kill JUST THAT ONE smbd.
(And make sure you get the right one — it should be one
that has a parent pid not equal to 1.)