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?

rst-2cv
  • 179

7 Answers7

8

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.

Overmind
  • 3,221
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.

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
  • 315
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
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.

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
  • 17,495
user9517
  • 117,122
0

... 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
  • 17,495