All versions of NFS use port 2049 to transfer data; NFSv1 – NFSv3 also depended on the “portmapper” service running on port 111, but this requirement was removed in NFSv4.
Note that the mount directory must be owned by root.
Root squashing
NFS root squashing
Files created on NFS shares inherit the remote UID. By default, NFS enables “root squashing”, which maps UID 0 to the nobody user.
Root squashing can be disabled in /etc/exports with the
Link to originalno_root_squash
flag. This is obviously insecure, however, as it allows a user that connects to that share as root to drop SUID binaries! (Remember that files on NFS mounts are created using the UID/GID values of the local user!)