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:
- Go to Control Panel > File Services > NFS (for DSM 7.0 and above) or SMB/AFP/NFS (for DSM 6.2 and earlier).
- Tick Enable NFS service.1
- 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:
- Go to Control Panel > Shared Folder.
- Select the shared folder that you want to access with your NFS client and click Edit.2
- Go to NFS Permissions and click Create.
- Refer to this article to edit the permission settings.
- Click Save (for DSM 7.0 and above) or OK (for DSM 6.2 and earlier) to save the rule.
- Click Save (for DSM 7.0 and above) or OK (for DSM 6.2 and earlier) to apply the NFS permissions.
- 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.
- Open a command console on your Linux PC.
- 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
-
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
-
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:
- 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.
-
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".
apt
is compatible with newer version of Linux. Ifapt
does not work, replaceapt
withapt-get
and try again.- 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.
- 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.