NFS (network filesystem) was developed by Sun, and its role is to share the directories you want to develop with others in the network, so that visitors can access things on the NFS server as if they were local files. Data security issues arise when files are exposed to others, but NFS has a rights management mechanism. As long as the rights management to do well, the file is clearly divided, security issues to rest assured.
NFS does not exist alone, it exists with another 2 modules, imagine how the hosts in the two networks communicate, of course, only through Ip+port to send data.
These three modules, including NFS, are Nfs,rpc,portmap respectively. NFS is only responsible for the data through the file system to share, and login management and Rights management, not responsible for data transmission, and the transfer of data has RPC to complete. Imagine that a remote client needs to know which port is available when linking, so that the available ports can be used for NFS data transfer (the NFS data transfer method has ports to complete), while the responsibility for maintaining the mapping between the available ports and the remote host is Portmap.
Two sub-modules for NFS, login management and Rights management are done by the two sub-modules RPC.NFSD and RPC.MOUNTD respectively. You can see the presence of both programs in the boot Code for NFS.
It is not difficult to think that the workflow of NFS is that the remote client makes an NFS request, the RPC obtains the request, notifies the Portmap to obtain the port number, and then portmap the available port number to NFS, RPC, then the NFS module checks for permissions, and if sufficient permissions are available, RPC transmits data through the port given by Portmap and arrives at the client through that port.
Several modules of NFS are roughly coordinated, with specific rights management, and the module configuration can be done through specific configuration files, such as/etc/exports,/var/lib/nfs/xtab and so on.
Introduction to Linux-nfs Principle