7

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?

rst-2cv
  • 151
  • 1
  • 1
  • 8

7 Answers7

6

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.

kaki gadol
  • 103
  • 4
Overmind
  • 2,970
  • 2
  • 15
  • 24
  • `nfs-utils` is installed (according to [this article](https://linuxacademy.com/community/show/8574-no-package-nfsutilslib-available/), `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 '19 at 07:46
  • [This forum post](https://forums.centos.org/viewtopic.php?t=53896) 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 '19 at 07: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 '19 at 07: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 '19 at 07:53
  • I was going through your list and got distracted :) Stay tuned, there will be a few more comments – rst-2cv Dec 24 '19 at 08:15
  • 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 Dec 24 '19 at 08:18
  • 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. – rst-2cv Dec 24 '19 at 08:23
  • Looks like you have a problem with your windows client-side NFS. You cannot mount if the NFS client is not working properly. – Overmind Dec 24 '19 at 08:49
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.

Peter VARGA
  • 332
  • 1
  • 2
  • 15
  • 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 08 '20 at 04: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? – Xavi Montero May 08 '21 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

sjbotha
  • 305
  • 4
  • 8
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.

Kiruahxh
  • 111
  • 2
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.

Qin Heyang
  • 101
  • 1
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.

yagmoth555
  • 16,300
  • 4
  • 26
  • 48
user9517
  • 114,104
  • 20
  • 206
  • 289
  • 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 '19 at 07:23
-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.

yagmoth555
  • 16,300
  • 4
  • 26
  • 48
  • 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 '22 at 06:05