How to access files on Synology NAS within the local network (NFS)

How to access files on Synology NAS within the local network (NFS)

Details

This article guides you through the steps of using your Linux computer to access your Synology NAS within the local network.

Resolution

Enable NFS service on your Synology NAS

Before accessing a shared folder with your NFS client, you must change the settings on your Synology NAS to allow sharing via NFS. Follow the steps below:

  1. Go to Control Panel > File Services > NFS (for DSM 7.0 and above) or SMB/AFP/NFS (for DSM 6.2 and earlier).
  2. Tick Enable NFS service.1
  3. Click Apply to save the settings.

Assign NFS permission to shared folders

Before accessing any shared folders with your NFS client, you must first configure the NFS permissions of the shared folder you wish to access. Follow the steps below to change NFS permissions of the shared folders on your Synology NAS:

  1. Go to Control Panel > Shared Folder.
  2. Select the shared folder that you want to access with your NFS client and click Edit.2
  3. Go to NFS Permissions and click Create.
  4. Refer to this article to edit the permission settings.
  5. Click Save (for DSM 7.0 and above) or OK (for DSM 6.2 and earlier) to save the rule.
  6. Click Save (for DSM 7.0 and above) or OK (for DSM 6.2 and earlier) to apply the NFS permissions.
  7. After applying the NFS permission, you can find the mount path of the shared folder at the bottom-left of the NFS Permissions tab. The mount path should be in the following format:/[volume name]/[shared folder name]

Mount shared folders via NFS on the client side

Once you have completed the steps above, you can mount the shared folder with your NFS client. Below we demonstrate how to access the shared folder using Linux.

  1. Open a command console on your Linux PC.
  2. Install the necessary components before proceeding with mounting.
    • Ubuntu3
      sudo apt update
      sudo apt install nfs-common
    • CentOS/Redhat/Fedora
      sudo yum install nfs-utils
  3. Enter the mount command as follows to mount shared folder via NFS on the client side:4
    sudo mount -t nfs [Synology NAS IP address]:[mount path of shared folder] /[mount point on NFS client]5
    • Example:
      sudo mount -t nfs 196.168.x.x:/volumeX/test /mnt
  4. Enter the disk free command to confirm you have successfully mounted the shared folder. The output in the Filesystem column should be in the following format:
    [Synology NAS IP address]:[mount path of shared folder]
    df

Notes:

  1. Synology NAS supports NFSv2 and NFSv3 by default. You can decide whether to enable NFSv4 or NFSv4.1 (availability depending on your product model). To enable the option, tick Enable NFSv4 support, Enable NFSv4.1 support, or Enable NFSv4 and NFSv4.1 services. For detailed steps and further information, refer to this article.
  2. For a list of shared folders that do not allow access via NFS, refer to the respective help articles:
    • For DSM 7.0 and above: The Limitations section under "To enable NFS service".
    • For DSM 6.2 and earlier: The Note section under "To enable NFS service".
  3. apt is compatible with newer version of Linux. If apt does not work, replace apt with apt-get and try again.
  4. If the shared folder cannot be mounted, check the firewall settings and make sure the user account has adequate access privileges for the shared folder that you wish to map.
  5. When mounting, you can add the parameters -o vers=2, -o vers=3, or -o vers=4 to the mount command to specify which NFS version should be used.
Details
Contents
Resolution
Enable NFS service on your Synology NAS
Assign NFS permission to shared folders
Mount shared folders via NFS on the client side
Further reading