Mounting QNAP from Linux

Accessing the QNAP from Ubuntu is fairly easy.

First install “smbfs”: -

sudo apt-get install smbfs

Then it’s just a matter of creating the relevant directories in /mnt

sudo mkdir /mnt/Qdownload
sudo mkdir /mnt/public
sudo mkdir /mnt/Qmultimedia
sudo mkdir /mnt/Qweb

…and then editing /etc/fstab

//192.168.0.2/Qdownload /mnt/Qdownload cifs credentials=/root/.credentials,directio,iocharset=utf8,noacl,noperm,nosetuids,rw
//192.168.0.2/Public /mnt/public cifs credentials=/root/.credentials,directio,iocharset=utf8,noacl,noperm,nosetuids,rw
//192.168.0.2/Qmultimedia /mnt/Qmultimedia cifs credentials=/root/.credentials,directio,iocharset=utf8,noacl,noperm,nosetuids,rw
//192.168.0.2/Qweb /mnt/Qweb cifs credentials=/root/.credentials,directio,iocharset=utf8,noacl,noperm,nosetuids,rw

You then need to create a file with your username and password in it: -

sudo vi /root/.credentials

and put the following in it: -

username=user
password=pass

A simple “sudo mount -a” will mount these filesystems ready for use.

Leave a Reply