Fix mount error(95): solved! Operation not supported SMB

15 Jan 2022 | Fix mount error(95): solved! Operation not supported SMB |

Mounts SMB/CIFS shares with Linux

It’s common practice to mount Windows file shares on Linux  using the SMB (Samba) implementation on Linux.  the command is fairly straight forward.

# Install the required libraries if you  haven't done that yet
sudo apt update
sudo apt install cifs-utils

#Next mount the folder you want 
sudo mount -t cifs -o username=user_name //server_name_or_ip/share_name /mnt/share_name

The command above would:

  • mount a server with the server_name or ip in the //server_name/share_name
  • to a local /mnt/share_name folder
  • so once the mount is complete you can access the shares contents by accessing the /mnt/share_name folder locally.

There are all sorts of options using this command , and when the share is created on the server , things like file access and permissions can be set.  You can find a more complete description here on how to access and setup windows shares in Linux

The issue with Samba/Cifs mounts (on Synology and other SMB servers) error 95

Apparently there has been a change to the SMB (Samba) protocol . SMB1 was the default, which may not be sufficient because of  upgraded  security requirement tof SMB2 . So try setting the version to SMB2 with ver=2.0  Or ver=3.0  , more specifically in my case, Synology updated their SMB server and increased the security  , and for those of us that do not keep up to date with the changes may find that our once working mount commands, are not failing with a message such as ..

mount error(95): Operation not supported

This obscure message with its “operation not supported” doesn’t shed light on the true cause of the issue. Online  documentation is  I was able to find online such as this Samba.Org mount.cifs document doesn’t really help much either.  The trick is you can try dmesg to give you  a more precise message.

mount error(95): Operation not supported 
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) and kernel log messages (dmesg)

You can try dmesg to give you  a more precise message

CIFS: VFS: Use of the less secure dialect ver=1.0 is not 
recommended unless required for access to very old servers
CIFS: VFS: cifs_mount failed w/return code = -95

So if you  haven’t a version set in your configuration (Your connection string) it will assume your client uses SMB1 as default, which may not be sufficient if the server you’re trying to connect to has upgraded there requirement to SMB2 . So try setting the version to SMB2 with ver=2.0  to see if it resolves the issue, as it did in my case,

So my Old error connection string

sudo mount -t cifs -o username=user_name //server_name/share_name /mnt/share_name

Revised  working connection string. use vers=2.0  as part of your -0 witch attributes.

sudo mount -t cifs -o vers=2.0,username=user_name,password=password //server_name/share_name /mnt/share_name

Anyways this was just a quick post as it was a pain in the ass as to why all of a sudden my mounts to my Synology began failing.. hope it helps.

If you found this post useful , leave a comment below!

36 thoughts on “Fix mount error(95): solved! Operation not supported SMB

  1. Reply Kyle Feb 15,2022 9:22 pm

    Awesome, was tearing my hair out

  2. Reply RobertoCBarbosa Mar 27,2022 6:36 pm

    A small detail, the option is vers= and not ver=. It helped me a lot, thank you.

    • Reply Tony B. Mar 27,2022 6:46 pm

      Obrigado! , I have revised the code change to show ver. Out of curiosity on what system did you need to make this change was it a nas drive?

    • Reply ashraf058 Apr 4,2022 6:49 pm

      yes, ver was giving me error, changed to vers according to your comment and it worked

  3. Reply Pcough Apr 19,2022 5:30 pm

    Brilliant, this helped with my WD Cloud NAS too after I updated the firmware!

  4. Reply Eldon Jun 3,2022 1:24 pm

    Thanks, I finally got ride of my 95 Error !

    If the error message was a little more specific, I maybe could have found the problem much quicker.

    Many Thanks. – Eldonb

  5. Reply Ozom Jun 8,2022 3:08 pm

    Is there a similar fix if via NFS?

  6. Reply radimch Sep 20,2022 7:57 am

    there a typo
    vers=2.0

    sudo mount -t cifs -o vers=2.0,username=user_name,password=password //server_name/share_name /mnt/share_name

  7. Reply spotlight Oct 24,2022 2:13 pm

    YMMD 🙂 Thanks from Germany for this very helpful article.

  8. Reply abelinux Nov 10,2022 7:28 pm

    Niceeeee! I have only mistake, I put a space between Vers=2.0 and username, when I erase this space, Vuolaaaa! Thanks a lot!

  9. Reply Smeden Nov 20,2022 4:51 am

    TY so much from Denmark! 🙂

  10. Reply eltoro0815 Dec 6,2022 12:16 pm

    TY from Germany!

  11. Reply Joepa Dec 11,2022 9:52 am

    Yes! Thanks much.

  12. Reply Anonymous Dec 16,2022 7:37 pm

    valeuuuuuuuu karaiooo 😀

  13. Reply vau haa Dec 30,2022 1:00 pm

    A useful fix, but only until the next restart.

  14. Reply Gerhard Jan 13,2023 2:29 pm

    thanks a lot, you saved my day!

  15. Reply Denis Feb 20,2023 12:19 pm

    Can you add information about how to mount vers=2.0 or 3.0 using fstab. Where the error 95 exists also.
    It can be helpful for automatic mounting this folder.
    “`//server_name/share_name /mnt/share_name cifs servers=3.0,credentials=/etc/samba/share.cred,uid=1000,gid=1000,iocharset=utf8 0 0“`

  16. Reply Chris S. Mar 21,2023 1:16 pm

    I was having the same issue “failed: Operation not supported (95)” when mounting my Windows 10 network share. I was using vers=3.0 until I went to the official cifs website (cifs.com/) and noticed that the vers should be changed from vers=3.0 to vers=3.1.1.

    Here is my new fstab statement:

    “//192.168.25.36/8TBWin /run/media/chris/hpelitedesktop cifs credentials=/root/.smbcred,vers=3.1.1,iocharset=utf8,u
    id=1000,gid=1000 0 0

    I am not filling up my cron job logs with “failed: Operation not supported (95)” anymore!

  17. Reply DCK Mar 23,2023 10:48 am

    Thanks a lot. That error 95 was driving me mad. I knew about the vers= option, but erroneously was attempting a vers=3.0 whereas the remote Synology was only expecting vers=2.0 (although it’s a recent DSM version).

  18. Reply El Gordo May 7,2023 6:47 am

    After several days of frustrating battle… Now it works.
    Thanks a lot!

  19. Reply Rajan Jul 5,2023 5:04 am

    Awesome saved my time

  20. Reply tpology Aug 30,2023 3:25 am

    Simple and Sweet. Thank you.

  21. Reply Mark Sep 4,2023 9:50 pm

    Thanks!!! Helpful!

  22. Reply Steve Sep 15,2023 6:37 pm

    Hi
    I have an OSError [Errno 95] Operation not supported error. Could someone help me with this? I’ve been stuck on this for a week and need to get on with my work.
    If you could dumb down the answer by about 100 IQ points, I would surely appreciate it.
    Looking at all the responses and not having a clue what you are talking about gives me hope that our earth is in good hands with a lot of smart people out there.

    • Reply Tony B. Sep 17,2023 6:50 pm

      OsError 95? This particular error is related to the Samba network protocolyou’re may be different, you need to provide a lot more technical details before I can suggest some options

  23. Reply vgehring24 Sep 23,2023 4:15 pm

    Trying to get the mount to work when not knowing about the SMB version change is really discouraging. Like when you are feeling pretty good about youself and then try to go order somebody else’s dog around . . .
    THANKS!!!

    • Reply Tony B. Sep 24,2023 8:01 pm

      I agree, these sorts of background changes, happen all over the place in the networking stack, its even worse for cloud services..

  24. Reply Salman N. Nov 15,2023 6:34 pm

    Thank you! This resolved it for me too (Ubuntu 18.04 connecting to SMB)

  25. Reply Jun L Mar 8,2024 7:38 pm

    This also helped my case! Thanks for the post.

Leave a Reply to Anonymous Cancel Reply