Typical non-solution, I would say. Don't do anything to definitively diagnose what the problem is, but just thrash around doing various things until something (hopefully) works.
Regrettably I'm not knowledgeable enough to fully diagnose it.
When I first had a read around about the issue it seems this is a common issue with Office on various platforms. The lock file gets left on the server for reasons unknown.
e.g A few typical links here.
https://superuser.com/questions/30980/microsoft-office-document-is-locked-for-editing-by-another-userhttps://www.experts-exchange.com/questions/26566869/Word-2010-Error-File-is-Locked-for-Editing-by-'another-user'.htmlI have seen similar issues occasionally with LibreOffice on Linux - the application crashes leaving a lock file (or some form of tmp file), or the 'Recently Used' menu can keep the file locked. Or a variety of other reasons.
As far as I am aware it isn't an issue with Samba but with the applications being a bit messy. (I have seen other issues, say with DBs, that have been with Samba and Oplocks etc. Windows Sage used to be a nightmare.... But I don't believe this is the case in this instance)
Happy to be corrected though.
I did post my smb conf for comparison. The OP is welcome to paste his own config and any log files that may be relevant.
FWIW some stuff on Samba debugging I found.
https://wiki.samba.org/index.php/Setting_the_Samba_Log_Levelhttps://wiki.samba.org/index.php/Client_specific_loggingTemporarily set the debug level [0-10] Default seems to 2 from testparm but man smb.conf says it should be 0
Check current parameters with testparm. use --help for usage information.
testparm -vs
This is a neat command I never knew about to change samba settings on the fly (man smcontrol):
smbcontrol smbd debug 2
Logs are in /var/log/samba
I found there is no key in SME to set the loglevel permamently
Checked the current level which seems to be to 2 though smb.conf says it should be 0
testparm -vs |grep log\ level
Or
testparm --parameter-name "log level"
You can add a debug setting by doing the following.
Edit this as a new file:
nano /etc/e-smith/templates-custom/etc/smb.conf/11loglevel
Add this code snippet:
{
$level = $smb{LogLevel} || '2';
return "log level = ${level}";
}
Try setting it to 2:
config setprop smb LogLevel 2
signal-event workgroup-update
(you might want to try
service smb restart
as well)
cat /etc/samba/smb.conf |grep log\ level
log level = 2
Now take a look in /var/log/samba and see what you can find in the logs.
Now try a higher level eg 3 (4 and above are dev stuff and generate a lot of logs) etc
Another setting you could try is upping the logging for locking like this:
config setprop smb LogLevel "2 locking:5"
This may give you some more info.
If you know the owner of the file you can set logging per IP and all sorts of other tricks. You may need to spend a bit of concentrated time to test this.
Remember to either delete the key or set it to 2 or a sensible level after testing !
OK. I've about exhausted my abilities. Let us know if anything shows up or you need further help.