We have two shares where users keep some Excel files. If a computer enters in sleep mode while an Excel file is opened from the Samba share, when is waked up it says the Excel file is in read-only mode because is already opened by “user X”, where “user X” is the user of the computer. If I restart the Samba service everything is back to normal.
Do you know a way how can I prevent file locks in Samba?
Which Excel version(s) do you use? I see basically two approaches: Change the Excel way to save (cached) files or change Samba way to lock files. I tend to the first choice.
I tried it now (Win 10 Client, Excel 2016, fully updated NS4 AD Server) with a guest share and it worked after wake up. Did you set some ACLs on the share or do you already use custom templates as regards samba?
You can see that the xls file is locked DENY_WRITE. If I kill Excel now or send my PC to sleep the lock is just away and only the folder is locked anymore:
This is still happening from the older versions of Excel to current, and regardless of type of server that is presenting the share where the files are stored. I even have it happening from a directory I have set up as a share and use from my standard desktop computer.
If I have an Excel file open and put the computer to sleep, when I wake the computer, the spreadsheets are in Read-only mode.