Jason’s Ranting & Raving

Those who don’t read have no advantage over those who can’t.

Mounting a Synology drive on Ubuntu Linux

Posted by jaystile on April 26, 2013

I was having a little trouble mounting my Synology network drive as described on the wiki. This is was on a clean installation of Ubuntu Linux 12.10.

These are the steps I took to figure out what was going on. First I had to find the IP address of the drive on my network. So, I downloaded nmap and then scanned my local network.

sudo apt-get install nmap
nmap -O

I found I was have troulbe with just using nfs as I had to use a username and password to connect to the shared drive. I found that using cifs worked for me. I installed it and then tried mounting the drive and it worked! Then I unmounted because I didn’t want to have to do this every time I wanted to access the drive.

sudo mkdir -p /mnt/synology
mount -t cifs -o username=MYUSER,password=***** // /mnt/synology
mount -a
ls -la /mnt/synology
umount /mnt/synology

I decided I wanted a little more permanent solution. So I created incorporated the ‘Basic Method’ steps from the synology wiki. I edited the /etc/fstab with the following:

// /mnt/synology cifs user,uid=yourusername,gid=users,rw,suid,credentials=/etc/cifspwd 0 0

Next was to create to the cifspw file.

sudo su -
echo username=yourusername > /etc/cifspwd
echo password=yourpassword >> /etc/cifspwd
chmod 0600 /etc/cifspwd
mount -a
ls -la /mnt/synology

I hope that works for you!

I built a new PC and had to try something new as my original instructions didn’t work for the fstab and creditials file.
I ran the command

 sudo su -
 dmesg | tail

I noted that there was an error: CIFS VFS: No username specified. After a quick google search some nice person posted a solution. However, it was a touch out of date as the package smbfs was retired and cifs-utils was the recommended package offered by apt-get.

sudo apt-get install cifs-utils

After a restart my mounts came back up correctly,.


3 Responses to “Mounting a Synology drive on Ubuntu Linux”

  1. JJA said

    This does not work for my Ubunto Synology combination… No hint helps.

    • jaystile said

      Sorry it didn’t work out for you! It didn’t for me either when I built a new PC and upgraded. I think I got it figured out now and I updated my blog post.

  2. morsch said

    Thanks for the post! Your cifs mount options — not entirely sure which of them, probably the uid/gid part — fixed my issue: I could mount and read the share, it was mounted as rw, however any non-root writes failed with permission denied.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: