11.04.2023 | 15:52
Q: Hey AI, how do I permanently mount shared folder from Synology NAS to Ubuntu server?
A: To permanently mount a shared folder from a Synology NAS to an Ubuntu server, you can follow the below steps:
Install the cifs-utils package on your Ubuntu server:
sudo apt-get update
sudo apt-get install cifs-utils
Create a directory on your Ubuntu server where you want to mount the shared folder:
Open the /etc/fstab file in a text editor:
Add the following line at the end of the file to mount the shared folder:
//<NAS_IP_Address>/<Shared_Folder> /mnt/synology cifs username=<NAS_Username>,password=<NAS_Password>,uid=<Ubuntu_User_ID>,gid=<Ubuntu_Group_ID>,file_mode=0777,dir_mode=0777 0 0
Replace the following placeholders with your own values:
<NAS_IP_Address>: The IP address of your Synology NAS.
<Shared_Folder>: The name of the shared folder that you want to mount.
<NAS_Username>: The username that you use to access the shared folder on the Synology NAS.
<NAS_Password>: The password that you use to access the shared folder on the Synology NAS.
<Ubuntu_User_ID>: The user ID of the Ubuntu user that you want to use to access the shared folder.
<Ubuntu_Group_ID>: The group ID of the Ubuntu group that you want to use to access the shared folder.
Save and close the /etc/fstab file.
Test the mount by running the following command:
If there are no errors, you should now be able to access the contents of the shared folder at /mnt/synology on your Ubuntu server.
To make sure that the mount persists across reboots, you can restart your Ubuntu server or run the following command:
sudo systemctl enable remote-fs.target
This will ensure that the shared folder is mounted at boot time.
Javi...