Create and Write to File System Fails using Windows NFS

Learn how to troubleshoot failures to create or write files on a file system mounted using Windows NFS.

Important

Before proceeding with troubleshooting, be sure to implement the following prerequisites for connecting to file systems from Windows instances:

Symptom: After installing Windows NFS client, you can successfully mount the file system from Windows, but any attempt to create or update a file in the file system fails.

Cause 1: Registry entries that map the AnonymousGid and AnonymousUid to the root user are missing or in the wrong place.

Access to NFS file systems requires UNIX-style user and group identities, which are not the same as Windows user and group identities. To enable users to access NFS shared resources, Windows client for NFS accesses file systems anonymously, using AnonymousGid and AnonymousUid. On brand new file systems, write permissions are only granted to the root user.

Solution: Verify that the correct registry entries are located in HKEY_LOCAL_MACHINE\Software\Microsoft\ClientForNFS\CurrentVersion\Default. If not, add the AnonymousGid and AnonymousUid registry entries to map them to the root user, and then remount the file system with the new user privileges.

Tip

You can verify the AnonymousGid and AnonymousUid are correctly set for a mounted file system by opening a Windows Command Line (CMD) window and typing the mount command without any arguments. A list of all mounted file systems and their properties is shown. The AnonymousGid (GID) and AnonymousUid (UID) values should appear as 0.

For example:

C:\>mount

Local    Remote                                 Properties
-------------------------------------------------------------------------------
X:       \\10.0.1.0\FileSystem                  UID=0, GID=0
                                                rsize=1048576, wsize=1048576
                                                mount=soft, timeout=0.8
                                                retry=1, locking=yes
                                                fileaccess=755, lang=ANSI
                                                casesensitive=no
                                                sec=sys

If they appear as -2, they have not been correctly set. Proceed to the instructions below.

Cause 2: A standard user is trying to access a file system that was mounted using the Administrator: Command Prompt (CMD). When mounting file systems, it isn't necessary to run the Command Prompt as Administrator.

Solution: Unmount the file system and then remount the file system using a standard Command Prompt. (CMD)