Skip to content

Mount an NFS Share on Windows

Last updated on

By default, the Windows NFS client uses very high UID and GID values (such as 65534) for anonymous access. Because these values have no write permissions on the NFS server, you can mount a STACKIT File Storage share successfully but cannot create or modify files.

  • The Client for NFS Windows feature is enabled. You can enable it via Control Panel → Programs → Turn Windows features on or off → Services for NFS → Client for NFS.
  • Your Windows machine is a VM running inside the STACKIT Network Area (SNA) of the project where the File Storage is activated. Accessing the share from a local machine over VPN is not supported.
  • The NFS Share has a Share Export Policy attached that grants the IP of your VM read-write access. See Create Share Export Policies for details.
  1. Open Registry Editor.

    Press Win + R, type regedit, and press Enter. Confirm the UAC prompt.

  2. Navigate to the NFS client default settings.

    In the left panel, expand the tree to the following path:

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\ClientForNFS\CurrentVersion\Default
  3. Create the AnonymousUid value.

    Right-click inside the right panel, choose New → DWORD (32-bit) Value, and name it AnonymousUid. Double-click the new entry and set its value to 0 (Base: Decimal).

  4. Create the AnonymousGid value.

    Repeat the previous step for a second new DWORD value named AnonymousGid, also set to 0.

  5. Restart the NFS client service.

    Open an elevated Command Prompt and run:

    Terminal window
    nfsadmin client stop
    nfsadmin client start
  6. Mount the share and verify write access.

    The STACKIT Portal displays the mount path in NFS format, for example 10.2.1.1:/rp_VKL20Ub/my-share. The Windows mount command requires this in UNC format: replace the colon with nothing and all forward slashes with backslashes.

    Terminal window
    mount -o fileaccess=777 \\10.2.1.1\rp_VKL20Ub\my-share Z:

    Then verify that you can create a file on the mounted drive:

    Terminal window
    echo test > Z:\write-test.txt

    If the command completes without error, write access is working correctly.