ShinChven's Blog

Mount Synology NAS with cifs-utils on Ubuntu

NAS, Ubuntu, Synology, fstab2021-08-11 04:45:20

Enable Samba Share

In order to access shared folders on Synology from Ubuntu, Samba share must be enabled.

Install cifs-utils

cifs-utils is the package for Linux to mount SMB/CIFS shares.

sudo apt-get install cifs-utils

Mount NAS Through fstab

Once cifs-utils is installed, we're ready to mount Synology's shared folders by editing the Fstab file.

Let's make a dir as the mounting point first:

sudo mkdir /mnt/synology/<SHARED_FOLDER_NAME>

Then, edit the /etc/fstab file, adding the following configuration:

//<SYNOLOGY_HOST>/<SHARED_FOLDER_NAME> /mnt/synology/<SHARED_FOLDER_NAME> cifs rw,dir_mode=0777,file_mode=0777,vers=2.0,username=<SYNOLOGY_USERNAME>,password=<SYNOLOGY_PASSWORD> 0 0

Finally, mount the Fstab file:

sudo mount -a