LinuxMint or Ubuntu: How to Automount Synology Shares

UPDATE:  As of Ubuntu 13.04, these directions no longer work.  I figured out a way to get this to work, however.  See the updated directions at the bottom of this post.

——————Old Directions————————————

If you’d like to share your network attached storage from a Synology file server with your Linuxmint or Ubuntu machine and have it appear as just another folder, you can set the Synology unit to automount on your computer.  These steps assume that you have already set up your Synology unit and are sharing at least one folder over the network.  It also assumes that you are already connected to the same local network as your Synology unit.

To set up the automount, do the following:

1) Install the package nfs-common, either using synaptic or the command line:

synology-01

(from the command line: sudo apt-get install nfs-common)

2) Open a console or terminal and type “ifconfig” to find out your IP address on your local network.

synology-02

 

Let’s assume your IP on the local network is 192.168.2.1 (as shown in the figure).

3) Open the Synology interface and then open the Control Panel:

synology-03

4) Click on “Shared Folder” which will show you a list of your shared folders.  Synology comes with the ability to share folders using the nfs protocol.  It is a secure protocol that requires you to add the IP address of the computer that is going to be allowed to access files on the Synology NAS.  Once you see the shared folders, select the folder you want to share, then click on “Privileges” and then “NFS Privileges”.

synology-04

 

5) In the next window, click on “Create” and then add the IP address of the computer with which you want to share that folder.  You should also decide what privileges you want to grant that computer.  If you grant it read/write privileges, that computer can modify files.  If you grant it the read privilege, that computer can only read files.

synology-05

6) Once you’ve done that, you should be able to access the shared folder over your network.  However, what we want to do is make any shared folders automatically mount over the network every time you start your computer.  To do so, you’ll need to do two more things.  First, create a folder on your computer to map the shared folder to.  An ideal location is in your home folder since you already have read/write privileges there.  So, for instance, if you are sharing photos over the network, create a folder in your home directory called “NASphotos” by doing the following from the terminal (or just create it in a file explorer): mkdir /home/user/NASphotos

7)  Next, you’ll need to edit your /etc/fstab file.  To do so, open a terminal and type: sudo kate /etc/fstab

(You could also use gedit or some other text program, like nano.)

8) This should open the /etc/fstab file in a text editing program.  You’ll need to add the following lines to your /etc/fstab file:

Any line that starts with the pound sign “#” is a comment line.  I like to add a comment line so I know what my command is doing.  Here’s the line I add:

# automount file synology

Next is the line that actually does the work:

     192.168.2.100:/volume1/photos /home/user/NASphotos nfs nouser,rsize=8192,wsize=8192,atime,auto,rw,dev,exec,suid 0 0

You’ll need to change the parts that are bolded.  The IP is the IP of your Synology unit on the network.  If you have a different name for your volume on your Synology unit, you’ll need to change “volume1” to whatever it is.  Replace “photos” with the name of the shared folder on your Synology unit.  Replace “user” with your username.  And replace “NASphotos” with whatever folder you created in step 6.

Save the file and close it.

8)  Now, assuming you’ve done everything correctly, type the following into a terminal to mount the shared folder: sudo mount -a

Your shared folder should now show up in your file explorer (e.g. Dolphin) and should do so every time you start your computer.  Depending on the privileges you granted yourself on the Synology NAS, you should be able to read and/or write whatever files you’ve stored on the Synology unit as if they were on your own computer.

 

——————————————New Directions—————————————

UPDATE: As of Ubuntu 13.04, the directions I gave above stopped working. After tinkering with the settings for a while, I found a way to make it work.  Follow all of the above steps.  However, when you edit the fstab file, try using the following format for each share you want to mount:

192.168.2.100:/volume1/photos /home/user/NASphotos nfs rw,hard,intr,nolock 0 0

This is working for now.  This was based on this article on the ubuntu help site.

82 Replies to “LinuxMint or Ubuntu: How to Automount Synology Shares”

  1. Very nice post, i’ve recently acquired a Synology DS413j and i’ve set it up with a Raspberry Pi (running raspbmc) and followed similar guides setting up the NFS shares, but i’m currently trying to set up auto-mounting to my desktop pc at home so i added the following 2 lines to fstab:
    *NAS-IP*:/volume1/media /home/user/foo/bar nfs nouser,rsize=8192,wsize=8192,atime,auto,rw,dev,exec,suid 0 0
    *NAS-IP*:/volume1/extras /home/user/foo/.extras nfs nouser,rsize=8192,wsize=8192,atime,auto,rw,dev,exec,suid 0 0

    and it works like a charm, except for the second folder “.extras” is locked upon mount, the “media”-folder which is the one holding the files for the xbmc-RPi as well is mounted as “a regular folder”, and i cant seem to figure out how to make it so with the .extras folder :(

    the 2 folders have exactly the same NFS privileges on the NAS.

    Any ideas ???

  2. @Br0wn
    Hmmm… The “.extras” folder is a hidden folder. That’s probably what is causing the issue. Not sure if there is a good workaround for that. Maybe someone more knowledgeable about this would know. You could try posting your question on the Synology or Ubuntu forums.

  3. @ryan
    Thought about the hidden attribute, but I tried to mount it to a normal folder as well, same result… did some ls -l though, and realized that some of the “ownership rights” were different for the folders.
    I’m reluctant to do a recursive change of ownership, since I’m not sure about the data being on a share, so i guess that it’s going to be some more googling :)

    Again, great post m8

  4. **Update**
    the faults was indeed my own, i did a “sudo chown -R user:user *folder*” from my desktop and the problem solved itself, but checking all the ownership right on with the NAS-webUI revealed all right handed over to “ID_1000” (default user id for ubuntu) which raised some other issues with users on the system. IT did however make me look into the permissions of the files and a closer (yeah i know i must have just skimmed the tickmarks the first time) look into the tickmarks showed me that “Others: Write” was unticked.. changed all the ownership back to the “NAS-user” and ticked the last box, issue solved :)

    //br0wn

    (sorry for all the posts, just thought an update was in order)

    1. Hi,

      First of all, thanks very much for this post. I am a complete noob to Linux and could access my DS212j with Mint16 thanks to this tutorial.
      However, when I tried to mount my second disk (“volume2”), I had a similar problem as Br0wn.

      I have no permissions in the folder I created for volume2. Not even read!
      When I tried to change the owner using the “sudo chown” command, i got:
      “operation not permitted”

      Could someone please help me?

      Thanks a lot

  5. I have been struggling to do this with Ubuntu 1204 (64) and a synology DS212 (DSM 4.0)
    I have followed this and several similar howtos.
    Everything is fine until the Mount – a
    I get
    mount.nfs: access denied by server while mounting ds212:/volume2/albion

    I assume the fstab entry somehow needs to be given the login credentials for the NAS but I have no idea how.
    Any Ideas

  6. JohnG,

    I had issues getting this to work with Ubuntu 13.04 (it worked great with 12.04). I just added an update to the directions to address the problems I had with Ubuntu 13.04.

    As for your specific issues, I have a few questions. First, did you set up the DS212 to allow your machine to connect? Second, are you using “ds212” in the fstab or the IP address of the DS212? If the error message you posted is the exact message, it would seem as though you used “ds212” in fstab but it should be the IP address of the machine.

    Try addressing those issues. If that doesn’t work, you could try the new fstab entry I just added to the directions.

  7. Hi Ryan,
    Thanks for the quick response.
    Yes I did set up the DS212 to Export the NFS Shares. following your guide and several similar ones.
    I tried replacing the DS212 name with the ip in FSTAB but that made no difference.
    I just got “mount.nfs: access denied by server while mounting 192.168.42.1:/volume2/albion”
    I tried your FSTAB line above to no avail.
    I have also tried setting up the export with the network range 192.168.42.0 /24 (as per the Synology NFS guide) or the IP addresse of my Ubuntu Client
    My Current etc/Exports looks like this
    /volume2/Albion 192.168.42.194(rw,async,no_wdelay,no_root_squash,insecure_locks,anonuid=0,anongid=0)

    I have disabled an re-enabled the NFS Service on the DS after each change

    sudo showmount -e ds212 gives :-
    john@Albion:~$ sudo showmount -e ds212
    Export list for ds212:
    /volume2/Albion 192.168.42.194

    I have followed this very useful NFS Troubleshooting guide, at least as much as I could figure out.
    http://www.troubleshooters.com/linux/nfs.htm
    Checked the Portmapper & nfs daemons are running

    I researched the UID/GID issue and established that the “anonuid=0,anongid=0” in exports should give an anonymous user Root privileges

    I also see my original assumption about passing credentials in FSTAB is erroneous.
    It seems that NFS manages access to the SHARE via the defined Hosts in exports, BUT that access to the underlying file system is dependent on the logged in user on the client somehow matching up with users on the DS.
    I also tried creating a user on the DS to match the Ubuntu Client user, hoewver the UID’s in the respective passwd files do not match (1031 vs 1001), I don’t know how to make them match?
    I have given every user and group on the DS RW on the Folder.

    All this has come about in a serious attempt to backup my Ubuntu laptop from which I run my daily business. I have tried several approaches, rsync & variants, the Synology “how to backup Linux clients” but it seems that NFS is the preferred way to do this, and I have never got it to work.

    I should say that I can access folders on the DS via SMB/CIFS shares and via FTP quite happily

    Stumped!

    1. Hi John,

      I think you may have stumped me as well. It seems like you’ve tried everything that I would.

      I used to use SMB/CIFS to automount my Synology shares but CIFS is now deprecated and it is recommended that you use NFS. That’s why I switched with Ubuntu 13.04. Can you get the shares to automount using SMB/CIFS?

      I created a tutorial to do this for Ubuntu when I was connecting to a different fileserver (a headless Ubuntu box) and running Ubuntu 12.04 : http://www.ryananddebi.com/2011/10/16/linuxmint-automount-server-share/

  8. Hi Ryan,
    Thanks for all the feedback. I think that, as usual, with things Linux, once one has hacked through an issue, and learned enough about it, then it is a good time to start over and do it properly. So I’ll have a go at clearing all my settings and starting from scratch.

  9. Hi JohnG,

    I’m in the same boat. I’m using a DS1813+ and Ubuntu 12.04 64-bit and am getting _exactly_ the same error. It’s sure frustrating! I’m going to keep on it, and if I figure it out, I’ll post back on here. I would greatly appreciate it if you’re able to get it working to report back with how you did it. Thanks!

  10. I eventually came right.
    In the meantime I had a disk crash in my DS, so in the process of dealing with that I upgraded to DSM 4.3, and of course my Ubuntu 12.04 updated a few times.

    DSM 4.3 supports NFSv4
    Following the DSM Help, & the above HowTo, to setup the DS with NFSv4 Enabled, I then followed
    For the Client Side with NFSv4, and all was a blaze of glory.

    The advantage here is that NFSv4 allows a single generic command to mount the whole Export Tree in one go. So now you can add Exports to your DS and your Ubuntu Client will mount them without any further intervention.

  11. These instructions are great.
    However, I just upgraded my DS412+ to version 5.0 and sure enough my Linux Mint box won’t mount my shared video folder anymore. Other machines (including an Ubuntu machine) have no problem.

    The error I get is:

    mount.nfs: access denied by server while mounting 10.42.1.95:/volume1/video

    The fstab lines are unchanged from when they were working yesterday, and I double-checked them against this webpage and it’s all ok.

    I get the same error if I try to mount a share manually.

    showmount -e 10.42.1.95 shows the correct shares.

    Now here’s another silly fact: while showmount works in listing my shares on my Synology NAS, I cannot ping the same NAS box from this Linux Mint box. This would make me think that a firewall is in the way, but if that were true then the other devices wouldn’t be able to hit the NAS either.

    My Windows 7 box can see the shares fine, as can my Ubuntu 13.10 box. The Ubuntu box is set up with identical commands in fstab as the Linux Mint box.

    Can anyone take a stab at this error?

    1. You’ve probably already checked this, but the first thing that comes to mind is: Is your IP on your LinuxMint machine still the same? My router changes my IP addresses for different computers on occasion (well, it did until I set it to static IPs). If that’s the problem, that’s a pretty easy fix.

      If that’s not it, which version of LinuxMint are you running? And have you upgraded all of your packages, etc.?

  12. Another thought and, again, probably something you’ve already checked: On your Synology server, did your NFS settings for that share change? (e.g., are they gone; did it switch from Admin access to Read-Only)

    Have you restarted the LinuxMint machine?

    And which version of LinuxMint are you running? Is it the latest version or an older version? If it’s the latest version, based off Ubuntu 13.10, then that is very, very odd.

    (I know these are basic suggestions, but they would be the first things I’d try.)

    1. It is the latest Mint (v. 16 Petra).
      Yes, I have restarted it a couple of times.
      The NFS settings are unchanged. As I mentioned, all my other machines can still read the shares.
      Still very puzzling. Your original instructions have worked flawlessly until now.

  13. I have a plan….

    The Mint machine’s only purpose was to show movies, so there’s nothing important on it. I’m the kind of guy who lives for Wipe and Load. So I’m going to do just that for the fun of it.

    So far I’ve tried Mythbuntu.. let’s not go there again..

    Presently installing regular Ubuntu. Once it’s loaded up I’ll try to hook into the Synology shares and see what happens, then report back.

    1. Well, that was probably going to be my next recommendation, but I always hate recommending reformatting unless you’re someone who likes doing it. Me, I love reformatting my computers. Do please let us know if that works.

  14. And once again, Wipe and Load saves the day…

    Not exactly a “fix’, but I seem to have access now…

    Thanks for your help!

  15. It’s amazing how many problems that seems to fix in Linux. I wipe my desktop and laptop and reinstall the OS at least twice a year, just to start fresh.

    Glad it worked.

    1. That sucks!

      There is one potential upside. If it still isn’t working with the new Ubuntu machine that is running the same version as your other Ubuntu machine, then the problem is likely with the Synology server, not the machine. So, I’d focus my efforts on the settings on the Synology box, not the Ubuntu box.

  16. grrr…. So my fstab (meticulously copied from your instructions above, as they’ve always worked for me before) continue to fail. BUT I can open Nautilus, go to Browse Network and find the shares and open a movie that way.

    I would still agree with you on the Synology box being the problem, since this issue started with the upgrade to 5.0, but the errors I’m seeing aren’t following any logical pattern!

    I still think it’s a permissions thing, but I can’t see why it works for one Ubuntu 13.10 box but not the other 13.10 box, when they’re box set up identical as far as I can see.

  17. I haven’t upgraded my Synology box to 5, so I can’t say whether that has caused problems with my machines. But, as the master of the obvious, I have to ask – you did install the “nfs-common” package on the newly formatted Ubuntu 13.10 box, right? I’m assuming you did, but I figure I should ask, just to rule it out.

  18. OK, I _think_ the problem may lie in a pooched network manager. Hitting the internet or other computers was flaky. So I did another wipe and load and so far so good. I’ll let you know if it changes again.

  19. Nope… pooched again. I watched a movie last night, then tonight (no reboots or anything all day) I can’t access the shares.
    Really not sure what to do now…

  20. Thanks for this tuto..BUT…

    I’m a fresh-new-newbie on linux mint 16, owning a synology d213j. I followed the procedure for the 4 folders (doc,music,video,photo) from my synology; I wrote a line in the fstab file for each.

    Save, close, terminal

    I typed sudo mount -a and I got that message, saying that there is no existing nfs mount point…?
    mount : le point de montage nfs n’existe pas
    mount : le point de montage nfs n’existe pas
    mount : le point de montage nfs n’existe pas
    mount : le point de montage nfs n’existe pas

    I tried tu reboot, but linux gave me the choice either to press S or M to skip the mounting process, since there is an error…

    What can I do? (step-by-step-as-a-baby, please)
    Thanks

    Maryse

    1. Hi Maryse,

      I’m guessing that the thing you didn’t do was create folders as the mount points. That’s what you’re missing. You’ll need to create a folder, probably in your home folder, where Linux Mint 16 can mount the Synology shares. It’s pretty easy. Go to your home folder and then right click and create a new folder for each of the Synology shares with the corresponding names for the shares (e.g., “photos”, “videos”, “music,” docs”, etc.). That should solve the problem.

      Right now, you’re trying to mount the synology shares, but fstab doesn’t know where you want to mount them because the mount points don’t exist.

      1. Oh, I did that! I created 4 differents folders into my “sarrazfrkls” folder (in a little house shape)

        If my Linux is in french…should I replace “home” for “Poste de travail” in the line?

        Here’s a copy-paste of the end of my gedit file:

        #automount file synology
        192.168.X.XXX:/volume1/Documents/home/sarrazfrkls/Synodoc nfs rw,hard,intr,nolock 0 0
        192.168.X.XXX:/volume1/video/home/sarrazfrkls/Synofilms nfs rw,hard,intr,nolock 0 0
        192.168.X.XXX:/volume1/music/home/sarrazfrkls/Synomusique nfs rw,hard,intr,nolock 0 0
        192.168.X.XXX:/volume1/photo/home/sarrazfrkls/Synophotos nfs rw,hard,intr,nolock 0 0

        thanks for the quick answer,
        Maryse

        1. Maryse,

          It’s hard to tell with the font, but please be sure that the “0 0” at the end of the line is “zero zero”, not “capital O capital O”. I made that mistake when I first tried this!

  21. Hi Maryse,

    Your fstab lines look wrong. Here’s what you posted:
    192.168.X.XXX:/volume1/Documents/home/sarrazfrkls/Synodoc nfs rw,hard,intr,nolock 0 0
    192.168.X.XXX:/volume1/video/home/sarrazfrkls/Synofilms nfs rw,hard,intr,nolock 0 0
    192.168.X.XXX:/volume1/music/home/sarrazfrkls/Synomusique nfs rw,hard,intr,nolock 0 0
    192.168.X.XXX:/volume1/photo/home/sarrazfrkls/Synophotos nfs rw,hard,intr,nolock 0 0

    They should be:
    192.168.X.XXX:/volume1/Documents /home/sarrazfrkls/Synodoc nfs rw,hard,intr,nolock 0 0
    192.168.X.XXX:/volume1/video /home/sarrazfrkls/Synofilms nfs rw,hard,intr,nolock 0 0
    192.168.X.XXX:/volume1/music /home/sarrazfrkls/Synomusique nfs rw,hard,intr,nolock 0 0
    192.168.X.XXX:/volume1/photo /home/sarrazfrkls/Synophotos nfs rw,hard,intr,nolock 0 0

    In the lines you posted, there was no space between the Synology share URL and the URL for the folders in your “home” drive. Try copying and pasting the fstab lines I just posted. I “bolded” the Synology share portion of the fstab line. There should be a space after the bold portion before the mount location.

    1. GEEE!! That is true. After the correction into the gedit file… here’s what I got (sorry, it’s in french…hope you’ll get something):

      sarrazfrkls@sarrazfrkls-linux ~ $ sudo mount -a
      mount : mauvais type de système de fichiers, option erronée, superbloc erroné
      sur 192.168.X.XXX:/volume1/Documents, page de code ou programme auxiliaire manquant, ou autre erreur
      (pour plusieurs système de fichiers (NFS ou CIFS par exemple), un
      programme /sbin/mount. auxiliaire pourrait être nécessaire)
      Dans quelques cas certaines informations sont utiles dans le journal
      système — essayez « dmesg | tail » ou quelque chose du genre

      1. Just to double-check, when you typed in “192.168.X.XXX,” you’re really including your actual IP address on your network for your synology server in the fstab file, right?

        So, it’s actually something like: 192.168.2.100 and you’re just posting 192.168.X.XXX to protect your IP address.

        1. Yes. I don’t know if there is a real security risk…but, yes, i’ve typed my real IP address :)

  22. And as Ryan said, you need to indicate _where_ you are mounting the shares to.

    I found this to be the most confusing thing when I first started using Linux, so don’t feel bad! You seem to be doing very well so far.
    When you mount a drive in Linux, you are actually just adding the drive’s content to a folder on your computer. So if I want to mount my Music folder (that’s on the Synology box) to my laptop, I have to make a folder on my laptop called /home/jeff/Music/tunes (the new folder will be called “tunes”). Then I mount the Music share (from the Synology) to the “tunes” folder:

    10.42.1.95:/volume1/music /home/jeff/Music/tunes

    (there is a space between /music and /home)
    we’ll worry about the other stuff at the end (nfs, rw, hard, etc.) later.

    So now, if I’m looking at my Music/tunes folder on my laptop, I will actually be seeing all of the music that’s really on my Synology box. It will look like I have a copy of all of my music on my laptop, but really I do not!

    So in your last message, it looks to me like you do not have four folders (called “mount points”) on your laptop. You need to make those first, then run the command that Ryan showed you.

    One other thing.. try to avoid using spaces in a directory name. It just confuses things. So “home” is better than “Poste de travail”.

    1. Thanks Jeff..I’m sooo confused right know! thank you for your encouragements! I still have a Microsoft brain since i’ve been with Linux for 48 hours.

      I’m not on a laptop, but on a PC..is that making any difference?

      On my DSM Synology, I have 4 folders (Documents, video, photo and music) On my Linux PC, I have created 4 folders directly into my user folder, along with folders named public, downloads, model, etc.

      In french, this “home” directory is called “Poste de travail”…

      Mostly my kids will use this computer, only to listen movies or music from synology…this is why I need it to be as clear and easy as possible.

      Thanks again!

  23. I don’t think that can be your IP address. It should be something more like: 192.168.1.100. How are you accessing your synology server? I’m assuming using a browser with an IP address. You should be able to find your Synology server’s IP address either on your router or on the Synology unit itself.

    1. I’m accessing my synology throught my other computer, with synology DSM. the Synology IP adress is shown in the browser. I used This specific adress in my command line

      1. OMG!! I feel sooo stupid! this is so obvious!

        I totaly forgot the first step! I found this tuto earlier at work, i jumped on my synology to do the sharing presets.

        I’m sorry guys for wasting your time….

        THANKS!!!!! (How can I erase my part of this tread?)

  24. Yes, Maryse, everybody (including myself) makes these mistakes when we’re learning.
    Welcome to Linux, you’ll soon learn to love it!

  25. Ryan, excellent tutorial.
    I would like to note that your updated code for Ubuntu did not work in Linux Mint 16.
    The line I eventually used in fstab is (after giving the unit a static address):
    172.16.1.121:/volume1/homes /home/rcook/nas nfs user,rsize=8192,wsize=8192,atime,auto,rw,dev,exec,suid 0 0
    (space between nfs and user).

    Thanks,
    Ron

  26. Well here’s one for the books..

    As you recall from the earlier comments I had reliable access to the Synology shares, then one day it all fell apart. I could navigate through the network and find the shares, but there was no way to get the client to mount the shares as described above (and as we’ve been doing for some time before),

    Well for lack of anything better to do, I swapped out the NIC card and popped in a similar model that was lying around the bench.

    And sure enough, the shares would mount and stay mounted.

    So I’m guessing that the problem was a half-dead NIC card? Strange times we live in…

    Thanks for your help of course. I had to report in to let you know that it’s fixed, although I have no idea why!!

  27. Here’s some more info in case anyone else is having problems.

    I have my “movies” PC running fine, thanks to the tips on this website. Yesterday I was looking at the NFS permissions for the video share and noticed that I had some leftover parameters from when I was having problems before. Specifically, I had a wildcard IP range AND a specific IP (the movies PC’s IP). To clean things up I deleted the specific IP and left just the wildcard IP. Sure enough, the movie I was watching crashed and I could no longer access the share from that PC.

    I added the specific IP back in to the permissions, rebooted the client PC and sure enough, the movies were working as normal again.

    So don’t always trust the wildcard * IP addresses if you’re having connection issues.

  28. Thanks! Exactly what I was looking for. I had some issues because I hadn’t set up admin access to the NAS shared folder before trying to mount it on the client.

  29. Have you set the permissions on the Synology Box to allow your IP address to have read/write permissions? That would be my first suggestion.

  30. Thx for the great tutorial.

    I got almost to the end : configured the NAS, edited /etc/fstab. If I type mount -a, I get full access to my files on the NAS.

    But it isn’t permanent : if I reboot, can’t get access to my NAS anymore, either from the Konsole or from the graphical user interface (Dolphin).

    If I type $ mount -a, access is back.

    What do I need to do to make the mount automatic at startup ???

    Thx,

    JP

    1. Weird. If you’ve made the changes to the fstab file, it should be permanent. Are you editing the fstab file with the root or sudo account?

  31. Yep :
    “$ sudo kate /etc/fstab”
    Besides, I suppose if I didn’t have privileges, I couldn’t make the changes in the fstab file. The changes are there all right, I can see them if I cat the file.

    The weird thing, is just after a reboot, I go to a terminal, and have the following :

    “$ mount

    systemd on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,noexec,nodev,none,name=systemd)
    $ sudo mount -a
    [sudo] password for jp:
    $ mount

    systemd on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,noexec,nodev,none,name=systemd)
    192.168.0.6:/volume1/data on /home/jp/test type nfs (rw,hard,intr,nolock,addr=192.168.0.6,_netdev)”

    So it seems to me, the change is there is the fstab file, but doesn’t get activated until I do a mount -a again. Once this is done, the NAS is visible in the termminal window, and, after a few seconds, in the graphical interface.

    Any ideas ? I’ve been on it for hours…

    thx,

    JP

    1. Still not sure why it isn’t propagating through the reboot. One possible workaround would be to create a bash file that runs on startup that simply enters “mount -a” in the terminal every time your computer starts. Otherwise, not sure what is causing the problem… I’ll keep thinking about it.

  32. Got stuck on mint 17.2 in getting nfs working.
    i keep getting “mount.nfs: access denied by server while mounting”.
    Im using “192.168.0.8:/Volume1/data /home/ed/nas nfs rw,hard,intr,nolock 0 0″in fstab.

    I tried various type of mounting commands like:
    192.168.0.8:/Volume1/data /home/ed/nas nfs rw,hard,intr,nolock 0 0

    sudo mount -t nfs //192.168.0.8/Volume1/data /home/ed/nas-data -o username=..,password=…

    i even synced the userid’s on both synology including the passwords.

    any suggestions are appreciated
    thx in advanced

    1. Hi Ed,

      Sorry for my delayed response. I’ve been out of town.

      Did you try “sudo mount -a”? That’s the command I typically use.

      Also, are you sure you installed the nfs-common package? If not, that could cause the problem.

      Finally, the only other thing that occurs to me is that you may not have assigned admin privileges to the folders you want to mount on the Synology device. If you haven’t properly assigned admin privileges for the IP address of the computer you’re using, it won’t work. Make sure that you’ve got the right IP address of the computer you’re using to access the Synology device when you add NFS privileges to that folder.

  33. I’m banging my head against the wall with this. I’ve used this guide successfully in the past, but I recently reinstalled Linux Mint with 17.3 and after following all of the steps, everything works wonderful until the next reboot. After restarting Linux, the shares are mounted successfully but no files or directories are visible from the client machine, neither through nemo or shell. If I manually mount (Eg. “sudo mount “) it works well. Then if I remove the entries from fstab and restart, put the entries back in fstab and do mount -a it works again, until next reboot. I DO NOT have this problem in another client also running mint 17.3. “nfs-common” is correctly installed I already checked that twice and if it wasn’t it would work the first time when I do mount -a.
    I have the gut feeling that something is not working well with the permissions but I’m clueless, I don think there is anything particular with the permissions of the mountpoint subdirectories, correct? besides I already checked that and do not see anything different than what I see in the other mint computer where everything works.

    Another possibility could be that somehow the shares are being mounted before network services are started?

    Thank you, any suggestion greatly appreciated

    1. Jorge,

      I haven’t upgraded to Linux Mint 17.3. I’m running 17.2 right now and it is working fine. I wonder if something happened in that transition to 17.3. Did you upgrade to Linux Mint 17.3 or did you reformat and do a fresh install of Linux Mint 17.3? Not sure that it would matter, but sometimes the upgrades don’t work all that well.

      The directories that the NAS folders are mounted to do need to be writable. I just checked the permissions on my folders and they are: 777 (read, write, execute by user, group, and others). They are owned by “root” and the group is “root.” What are the permissions on your folders where you mount the NAS shares?

      1. Hi Ryan… thanks for responding

        The install is fresh with format (Same as the other computer where it works). BTW I also have a vmware machine which I upgraded to 17.3 and the shares automount just fine inside the VM, so I guess that doesn’t matter

        I changed the permissions and owners of the subdirectories as you describe to no availability.

        Another thing I just tried is to put regular mount commands in /etc/rc.local and the results are exactly the same, the shares mount during boot but even though mounted no files are visible when navigating into the shares via nemo nor shell.

        I’m really starting to think the reason is something is not working normally during the boot of this computer :(

        1. Hmm… Frustrating, I’m sure. I don’t know what else to tell you to try.

          If I knew more about bash scripting I could probably help you create a bash script that simply did a “sudo mount -a” every time your computer started, which would solve the problem for you. You could probably figure out how to do that by searching around on Google. But that seems like the only solution at the moment without digging deeper down into the start up sequence.

          1. Thanks I appreciate you trying. That would not work, as it doesn’t work when I reboot and do “sudo mount -a” from the shell. The reason it doesn’t work is because the shares are actually mounted successfully upon boot, even if I just type “mount” I can see them listed correctly. It is just that they look as if they were empty (No files or subdirectories).

            I think what I have to do is analyze the boot process and logs to see what is going wrong with it, and / or reinstall… I will keep you posted.

  34. Thx for this great post. Everything works, but i have one problem.
    NFS does not work with user rights. So if i put NFS on for the HOMES folder on the Synology, everybody can access each otters folder. Is there a way to get arround this problem, so you can only access your own home folder?

  35. Still a useful post

    A small “problem” I identified is caused by the difference between permissions created by EXT3 and 4 … EXT3 just has Advanced/”Advanced Settings” which don’t need to be changed, while EXT4 uses both Advanced/”Advanced Settings” and adds Advanced/”Advanced Share Permissions” which do need to be configured to add users.
    It’s easy to overlook. Also EXT 4 seems to benefit from the “map all users to admin”
    I’ve also found in Mint cinnamon 17.3 that both fstab options shown here work OK.

    If all else fails, the option to mount shares using CIFS has served me well with distros like puppy slacko

Leave a Reply

Your email address will not be published.