August 22, 20232 yr I have a strange issue with am Unraid server running NFS shares. Facts: * Running a fresh install of Word on a fresh Mac on a fresh Unraid server * Documents are on an NFS4 network share * The share and documents has all permissions: Read - Write - Execute * I can verify this by using "Get info" on a Word document and see that myselv, mygroup and all users has Read and Write. I can also verify directly on server. Documents are 777 (rwx for all) * Ready only is not set on document * Locked is not set on document Symptoms: * When I open a document located on the share in Word on the Mac - it displays a message that the document is read only and only gives me the option do duplicate it. I can duplicate it fine and save to the network location, but when opening the duplicated document, I get the read only message again. * No other programs are behaving this way on the same share - Excel, Powerpoint etc works fine. I can even open a Word document in a text editor and are able to save it - so if it definitely not read only * If I create a new Word document and saves it to this network share - I get the same behaviour - it gets read only * If I map the network share using samba (SMB) protocol instead of NFS, it works fine - issue is only with NFS (but I prefer NFS due to speed & reliability when there are many files) So somehow Word thinks that documents on the network share are read only - while they definitely not are read only. Any ideas?
August 22, 20232 yr Author 2 minutes ago, dlandon said: Let's start by you posting diagnostics. I don’t think we need diagnostic here. There is nothing wrong with my Unraid server. I did some testing and if I used NFS version 3 (instead of 4), it worked fine. I know that locking implementation is totally changed in version 4, and I guess that this might be the reason why Word thinks the file is locked (even if it is not) In v3 you can disable locking using mount options on client, but in v4 this does not seem possible. You get an error if using the various lock options when mounting v4. it might seem that turning of locking must be done on server side, which is not possible (at least not easy) since Unraid has no option that can be set on the NFS service.
August 22, 20232 yr It's hard for me to understand what you are doing without seeing diagnostics. The first thing that comes to mind is if you are sharing the NFS shares public or private. If private the options are set with rules and I'd be able to see how you have them set.
August 23, 20232 yr Author Attached is server log. NB! The shares works fine and has RW, performs well and behaves correctly. The issue is only with MS Word on Mac running with NFS version 4. Word thinks that files are locked - even if they are not. Excel, Powerpoint and other applications behaves correctly. Mounting the share using NFS version 3 resolves the issue and Word is ok again. I suspect it is because of the rewritten locking in NFS version 4. This was a big thing for NFS v4 - and it might get Word confused. When mounting NFS version 3 shares, it is possible to specify locking options (e.g. local locking) - but no such options are available on client side for version 4. It either does not except these mounting options or ignores them. So it would be good if there were some NFS service options in Unraid available, so the server parameters could be tuned. stardustunraid-diagnostics-20230823-0556.zip
August 23, 20232 yr Searching the Internet, I find some information that might be helpful. Changes you can make in the share rules for locking: In NFSv4 (Network File System version 4), file locking is controlled primarily by the lock export option. The lock export option allows you to specify how locking operations are handled for the exported directory. There are a few different options you can use with lock: lock: This option allows locking operations (both local and network locks) on files within the exported directory. It's used to enable file locking support for NFSv4 clients. no_lock: This option disables locking operations on files within the exported directory. Clients attempting to perform locking operations will receive a "not supported" response. local_lock: This option enables only local locks (locks acquired by processes on the server itself), while network locks (locks acquired by remote clients) are disabled. It's important to note that NFSv4 includes improved support for locking compared to earlier versions of NFS. NFSv4 supports a single unified locking model that combines local and network locks, which simplifies locking operations and reduces the need for special configurations. In many cases, using the default lock option is appropriate as it provides the expected locking behavior. If you want to disable locks for some reason, you can use the no_lock option. Here are some suggestions for locking issues with Word on a Mac: Use Local Copy for Editing: If locking problems continue, consider copying the files you need to work on from the NAS to your local Mac before editing. This avoids the potential NFS locking issues altogether. Temporary File Use: Configure Microsoft Word to create temporary files locally while editing and then sync back to the NAS when saving. This can help minimize locking issues during real-time editing. It might be a good idea to contact Microsoft Support for further assistance. They can provide more specific troubleshooting steps based on your situation.
August 23, 20232 yr Author 16 minutes ago, dlandon said: Searching the Internet, I find some information that might be helpful. Changes you can make in the share rules for locking: In NFSv4 (Network File System version 4), file locking is controlled primarily by the lock export option. The lock export option allows you to specify how locking operations are handled for the exported directory. There are a few different options you can use with lock: lock: This option allows locking operations (both local and network locks) on files within the exported directory. It's used to enable file locking support for NFSv4 clients. no_lock: This option disables locking operations on files within the exported directory. Clients attempting to perform locking operations will receive a "not supported" response. local_lock: This option enables only local locks (locks acquired by processes on the server itself), while network locks (locks acquired by remote clients) are disabled. Thanks - where did you find this information? I have done extensive Googling without finding this. Can you please refer me to the documentation you found?
August 23, 20232 yr Author 3 hours ago, dlandon said: hanges you can make in the share rules for locking: In NFSv4 (Network File System version 4), file locking is controlled primarily by the lock export option. The lock export option allows you to specify how locking operations are handled for the exported directory. There are a few different options you can use with lock: lock: This option allows locking operations (both local and network locks) on files within the exported directory. It's used to enable file locking support for NFSv4 clients. no_lock: This option disables locking operations on files within the exported directory. Clients attempting to perform locking operations will receive a "not supported" response. local_lock: This option enables only local locks (locks acquired by processes on the server itself), while network locks (locks acquired by remote clients) are disabled. I tried: 192.168.1.0/24(sec=sys,rw,insecure,anongid=100,anonuid=99,all_squash, no_lock) 192.168.1.0/24(sec=sys,rw,insecure,anongid=100,anonuid=99,all_squash, local_lock) 192.168.1.0/24(sec=sys,rw,insecure,anongid=100,anonuid=99,all_squash, lock=no_lock) None of these worked: abc@AbcMacStudio nfshare % mount -o nfc,vers=4 -t nfs 192.168.1.130:/mnt/user/documents /Users/abc/nfshare/documents mount_nfs: can't mount /mnt/user/documents from 192.168.1.130 onto /Users/abc/nfshare/documents: No such file or directory mount: /Users/abc/nfshare/documents failed with 2 If I remove the lock related options - it works fine again. So it does not seem to be possible to do like this.
August 23, 20232 yr The options are: 'lock' 'no_lock' 'local_lock' Not 'lock=no_lock". Try just 'lock'.
August 23, 20232 yr Author @dlandon See my previous post and all the examples of what I tried. I tried that as well. Edited August 23, 20232 yr by ziggy99
August 23, 20232 yr 9 minutes ago, ziggy99 said: @dlandon See my previous post and all the examples of what I tried. I tried that as well. I'm out of ideas. You should probably check with Microsioft and/or Apple for further help.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.