9

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?

4
  • Are your machines on the same network segment ?
    – Overmind
    Dec 24, 2019 at 7:10
  • Yes - edited the OP to reflect that
    – rst-2cv
    Dec 24, 2019 at 7:17
  • 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? Dec 25, 2019 at 6:12
  • Could you please share the output of showmount -e localhost?
    – 2ps
    Dec 27, 2019 at 2:07

7 Answers 7

7
+25

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.

8
  • 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
    Dec 24, 2019 at 7:46
  • 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
    Dec 24, 2019 at 7:46
  • 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?
    – rst-2cv
    Dec 24, 2019 at 7:47
  • Yes, many services have different names or are different packages, including firewalld instead of the classic ip tables. Did you match the G/UIDs ?
    – Overmind
    Dec 24, 2019 at 7:53
  • I was going through your list and got distracted :) Stay tuned, there will be a few more comments
    – rst-2cv
    Dec 24, 2019 at 8:15
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.

2
  • 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.
    – Nisse
    Jun 8, 2020 at 4:46
  • And the other way around? My server is v4 only and I can't change it. Any way to mount nfs v4 from windows? May 8, 2021 at 12:05
1

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

0

Any ideas?

SELinux doing it's job is my idea.

Edit;

-I know from personal experience that SELinux is always a good thing to check when dealing with an RHEL/Centos system when something off happens. Checking /var/log/audit for AVC denied

-setenforce 0 could be tried.

1
  • 1
    Good idea but no cigar. SELinux was set to enforcing (default), so I ran sudo setenforce 0 but it didn't help.
    – rst-2cv
    Dec 24, 2019 at 7:23
0

It happened to me when the NFS disk was already mounted. It was not listed in explorer because I mounted it from an elevated cmd terminal. On windows, mounting an NFS disk usually doesn't require elevated priviledges.

0

In my case, this error is because I put the wrong remote path, literally as the error message "The network path was not found" indicates.

I get it wrong and misunderstand it as host not found thus spend quite some time digging through network stacks before I realize the real issue.

-1

... and I'm trying to mount the share on my Windows 10 Pro x86_64 machine

I seen your server listen on port 2049 and the insecure option didn’t worked out;

I would advise to set that registry at OFF (0) to allow the NFS client to allow to bind to a unreserved port (over 1024).

HKLM\Software\Microsoft\ClientforNFS\CurrentVersion\Default\

UseReservedPorts := 0 (DWORD-32b)

It’s an option set at ON by default.

1
  • 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.
    – user959274
    Mar 20, 2022 at 6:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .