Can't mount CentOS NFS share on Windows 10 - "Network Error - 53"

18,414

Solution 1

On the Linux part - make sure your NFS Server Configuration is correct:

  • nfs-utils and nfs-utils-lib should be installed

  • rpcbind, nfs-server, nfs-lock, nfs-idmap should be enabled

  • rpcbind, nfs-server, nfs-lock, nfs-idmap should be started

  • Choose the directories you want to share

  • make sure your user can access everything inside his directory

  • get the UID and GID of the user you plan to use

  • get the IP address of your Windows 10 NFS client

  • edit the exports file (etc/exports) and add the user you will use to it: /home/user 192.168.1.2(rw,sync,root_squash,all_squash,anonuid=1001,anongid=1001) - note: the IDs are the ones obtained previously

  • restart the service with systemctl restart nfs-server

  • get the proper ports with rpcinfo -p

  • add them to the firewall

On the windows part:

  • make sure you installed Client for NFS

  • you now need to match the UID and GID that pulled earlier (1001 in the linux part example) on both the Server and the Client

  • regedit to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\ClientForNFS\CurrentVersion\Default

  • You will need to make two new DWORD (32-bit) entries by right clicking inside the Default key. They should be named “AnonymousGid” and “AnonymousUid”. They should both have a decimal value matching your user’s GID and UID that you got earlier (1001 in the example)

  • restart NFS service on the Windows 10 Client side by using :

    nfsadmin client HOSTNAME config casesensitive=yes

    nfsadmin client HOSTNAME stop

    nfsadmin client HOSTNAME start

  • finally, make your mount: mount -o anon \\192.168.1.3\home\storage\ X:

You should get a successful mount message.

Solution 2

This solved it for me:

The NFS was running only under NFS v4 - adding v2/3 service to the Linux server solved the problem and I could mount the NFS.

Solution 3

In my case the firewall was causing this even though I had the ports 111, 2049 and 20048 allowed through. I just opened up the firewall completely between the two servers and it worked so I'm not sure which ports need to be opened.

I suspect following this advice to set static ports and then opening those up would also work: https://askubuntu.com/questions/1313682/set-static-ports-for-nfs-v3-on-ubuntu-20-x-server

Share:
18,414

Related videos on Youtube

rst-2cv
Author by

rst-2cv

Updated on September 18, 2022

Comments

  • rst-2cv
    rst-2cv almost 2 years

    I have a CentOS 8 virtual machine (192.168.10.203) running nfs-server, and I'm trying to mount the share on my Windows 10 Pro x86_64 machine (192.168.10.10) I have installed the "Services for NFS" Windows feature), but when I run mount \\<nfs_server_IP>\data N:, I keep getting this error:

    Network Error - 53

    Type 'NET HELPMSG 53' for more information.

    The message for Network Error 53 is "The network path was not found" but I'm not sure what that means.

    This is what my /etc/exports looks like on the CentOS machine:

    /data 192.168.10.0/24(rw,sync,root_squash,insecure,anonuid=0,anongid=0)
    

    I've also tried with the bare-minimum options:

    /data 192.168.10.0/24(rw,sync)
    

    Both the CentOS and Windows 10 machines can ping each other.

    I can connect to the NFS server on port 2049

    Output of rpcinfo -p localhost run on the NFS machine:

    $ rpcinfo -p localhost
           program vers proto   port  service
            100000    4   tcp    111  portmapper
            100000    3   tcp    111  portmapper
            100000    2   tcp    111  portmapper
            100000    4   udp    111  portmapper
            100000    3   udp    111  portmapper
            100000    2   udp    111  portmapper
            100024    1   udp  39181  status
            100024    1   tcp  38357  status
            100005    1   udp  20048  mountd
            100005    1   tcp  20048  mountd  
            100005    2   udp  20048  mountd
            100005    2   tcp  20048  mountd
            100005    3   udp  20048  mountd
            100005    3   tcp  20048  mountd
            100003    3   tcp   2049  nfs
            100003    4   tcp   2049  nfs
            100227    3   tcp   2049  nfs_acl
            100021    1   udp  53482  nlockmgr
            100021    3   udp  53482  nlockmgr
            100021    4   udp  53482  nlockmgr
            100021    1   tcp  39197  nlockmgr
            100021    3   tcp  39197  nlockmgr
            100021    4   tcp  39197  nlockmgr
    

    I have the insecure option in my /etc/exports per "Network Error - 53" while trying to mount NFS share in Windows Server 2008 client. Didn't work.

    I've tried disabling the firewalls on both hosts with no results (systemctl disable firewalld && iptables --flush on the CentOS machine, and disabling both Windows Defender Firewalls (public and private network firewalls).

    Any ideas?

    • Overmind
      Overmind over 4 years
      Are your machines on the same network segment ?
    • rst-2cv
      rst-2cv over 4 years
      Yes - edited the OP to reflect that
    • Mircea Vutcovici
      Mircea Vutcovici over 4 years
      How do you plan to use the mount? You could also use samba. Which version of NFS protocol are you planning to use: 3 or 4? Do you want to user kerberos auth, encryption?
    • 2ps
      2ps over 4 years
      Could you please share the output of showmount -e localhost?
  • rst-2cv
    rst-2cv over 4 years
    Good idea but no cigar. SELinux was set to enforcing (default), so I ran sudo setenforce 0 but it didn't help.
  • rst-2cv
    rst-2cv over 4 years
    nfs-utils is installed (according to this article, nfs-utils-lib was rolled into nfs-utils as of RHEL 7.6, and CentOS 7 made the change as well, which should mean CentOS 8 is the same, and explains why I nfs-utils-lib isn't found on my machine).
  • rst-2cv
    rst-2cv over 4 years
    This forum post suggests nfs-lock and nfs-idmap are called rpc-statd and nfs-lockd respectively. rpcbind, nfs-server, rpc-statd, and nfs-idmapd are all started and enabled where applicable (apparently rpc-statd isn't supposed to be enabled by systemctl).
  • rst-2cv
    rst-2cv over 4 years
    I've chosen the directory I want to share. As for checking if my user can access it, how do I check if a Windows user accessing the share anonymously can access it without mounting the share?
  • Overmind
    Overmind over 4 years
    Yes, many services have different names or are different packages, including firewalld instead of the classic ip tables. Did you match the G/UIDs ?
  • rst-2cv
    rst-2cv over 4 years
    I was going through your list and got distracted :) Stay tuned, there will be a few more comments
  • rst-2cv
    rst-2cv over 4 years
    Here's my /etc/exports: /data 192.168.10.0/24(rw,sync,root_squash,all_squash,anonuid=1001,‌​anongid=1001). I set the anonymousGid and anonymousUid to 1001 in the Windows registry. Restarted the nfs-server service. Firewall is disabled (iptables flushed) on the NFS server for debugging purposes.
  • rst-2cv
    rst-2cv over 4 years
    Ran nfsadmin client 192.168.10.203 config casesensitive=yes, but got an error Failed to connect to NFS WMI provider.. In case this isn't a huge issue, I moved on and tried to stop the nfsclient, which failed with the same error message. Tried to mount anyway (mount -o anon \\192.168.10.203\data\ X:); still got Network Error 53. I just don't understand what's going wrong.
  • Overmind
    Overmind over 4 years
    Looks like you have a problem with your windows client-side NFS. You cannot mount if the NFS client is not working properly.
  • Nisse
    Nisse about 4 years
    Really old question, but I am having the same problem. Might I ask how you added v2/3 support? I'm using Fedora 31, and it seems that all versions should be supported by default, making it hard to check if it really is.
  • Xavi Montero
    Xavi Montero about 3 years
    And the other way around? My server is v4 only and I can't change it. Any way to mount nfs v4 from windows?
  • user959274
    user959274 over 2 years
    Thanks yagmoth555 for your post. I have been struggled with mounting a NFS shared folder on Windows 10 and keep getting the error 'Network Error - 53' for many days. By turning on the nfs server log, using 'rpcdebug -m nfsd -s all' and use 'journalctl -fl' to tail the nfs server log. I found out that the NFS server refused the mount request from the client ip address because of illegal port 62465. From your post, I got a hint to set UserReservedPost to 1 and this fixes my problem.