4.5 Ensure nfs server is not running


macOS can act as an NFS fileserver. NFS sharing could be enabled to allow someone on another computer to mount shares and gain access to information from the user's computer. File sharing from a user endpoint has long been considered questionable and Apple has removed that capability from the GUI. NFSD is still part of the Operating System and can be easily turned on to export shares and provide remote connectivity to an end user computer.


File serving should not be done from a user desktop, dedicated servers should be used. Open ports make it easier to exploit the computer.


The nfs server is both a point of attack for the system and a means for unauthorized file transfers.


Run the following command to disable the nfsd fileserver services:

$ sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.nfsd.plist

Remove the exported Directory listing

$ sudo rm /etc/exports

See Also


Item Details


References: 800-53|CM-7b., CSCv6|9.1

Plugin: Unix

Control ID: 9e45bc4a6ea897d1d14fce53f93a39e6252ee4db6857c99469ff3637c51ce5cc