Accesss to NFS share on Win7

    • Accesss to NFS share on Win7

      I am kind of a newbie with OMV, i have installed it on my BananaPI and also set SMB for sharing my files from external disk.
      Since SMB is a bit slow and is also (probably) causing other problems i started to contemplate to try NFS instead. I have no problems with user rights when using SMB, it looks like i configured Access Rights properly.


      Well, with some hassle at begining I finally configured NFS so far that I can map this share with IP\export\ folder on my Win7. Now it is mapped.
      Unfortunately i can only access to "export" folder but no further. I can see there is my folder on the disk but i can't access it. The error message i get is "Windows cannot access \\ip\export\folder. You don't have permission to access this folder."

      As far as i understand the problem is probably in Access Rights?
      I've read a lot of topics on this forum and I noticed that user
      davidh2k mentioned UID and GID? Is it maybe something wrong with this? How can i check this and what should i do?


      I am not a linux Pro so i don't know how exactly to use CLI. I installed Putty and used some commands in there to get NFS in working order (at begining nfs service wasn't running, so i started it manually), otherwise I don't know how to work with CLI. I only know how to use OMV with GUI.


      Could you just give me couple of advices so i can start moving forward? I am struggling here, i googled everything, i don't know how to move on.

      Please help ;( Thank you! :rolleyes:
    • First of all, i wouldn't pursue further to mount nfs in win7. All my experiences...slow slow slow. Displaying folders accessing files, etc etc. I think nfs support has improved in server versions of Windows.

      Regarding nfs setup in omv you should use the webUI to set it up. Not the cli. NFS in omv uses mount bind to the original folder location to /exports. You can check with the terminal what the permissions are in the folder you're trying to expot, you should try in the nfs extra options this:

      subtree_check,insecure,no_root_squash,anonuid=0,anongid=0

      Be aware the nfs doesn't have any authentication so anyone can mount in the network
      New wiki
      chat support at #openmediavault@freenode IRC | Spanish & English | GMT+10
      telegram.me/openmediavault broadcast channel
      openmediavault discord server
    • I've heard different that NFS is faster than SMB. Well it will be the best to test it by myself...to do that i have to enable NFS first :S

      The command line subtree_check,insecure,no_root_squash,anonuid=0,anongid=0 you suggested didn't work, still the same problem.


      You can check with the terminal what the permissions are in the folder you're trying to expot, you should try in the nfs extra options this:

      How do i check that with the terminal?



      ​Be aware the nfs doesn't have any authentication so anyone can mount in the network


      Is this true? I thought you can limit who can mount the drive by IP address?
    • pisco wrote:

      I've heard different that NFS is faster than SMB


      Yes, but it relates mostly to nix environments.

      pisco wrote:

      Well it will be the best to test it by myself...to do that i have to enable NFS first


      of course feel free to try.

      pisco wrote:

      How do i check that with the terminal?


      ls -la /folderpath

      pisco wrote:

      Is this true? I thought you can limit who can mount the drive by IP address?


      Why would i be lying? do the search by yourself if you want
      I am talking about login/password, and you mention restriction by IP? we're talking different stuff here. NFS can do authentication with kerberos. Too complex for me, but there is this guide from ubuntu if you want to try

      help.ubuntu.com/community/NFSv4Howto

      pisco wrote:

      The command line subtree_check,insecure,no_root_squash,anonuid=0,anongid=0 you suggested didn't work, still the same problem.


      This wasn't a command line, is suppose to be in the extra options of nfs share, like the screenshot below
      New wiki
      chat support at #openmediavault@freenode IRC | Spanish & English | GMT+10
      telegram.me/openmediavault broadcast channel
      openmediavault discord server
    • I didn't read it the whole thread, but since you asked me to show how I do it: My workaround for that problem is to force the IDs. Be carefull to change the IDs to a non-priviliged user (instead of root user like you see in the screenshot).

      [IMG:http://i.imgur.com/t2dBdEN.png]

      Greetings
      David
      "Well... lately this forum has become support for everything except omv" [...] "And is like someone is banning Google from their browsers"

      Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.


      Upload Logfile via WebGUI/CLI
      #openmediavault on freenode IRC | German & English | GMT+1
      Absolutely no Support via PM!

      I host parts of the omv-extras.org Repository, the OpenMediaVault Live Demo and the pre-built PXE Images. If you want you can take part and help covering the costs by having a look at my profile page.
    • davidh2k, i have changed the ID's as you suggested and it doesn't work also.

      Actually now i suddenly can't access no more also to /export . I have changed it back as it was and still doesn't work. How soon do the changes take affect after applying settings in OMV?

      Check the printscreens of several settings, i am not sure if all is OK as it should be?


      subzero79 yes I do have NFS component in the Windows installed (see printscreen).
      I map network drive via Explorer - Map Network Drive (as on the printscreen)
      Images
      • 3.JPG

        25.98 kB, 792×192, viewed 556 times
      • 4.JPG

        42.19 kB, 633×461, viewed 581 times
      • 5.JPG

        50.47 kB, 428×373, viewed 565 times
      • Capture1.JPG

        43.44 kB, 413×460, viewed 574 times
      • Capture2.JPG

        44.58 kB, 416×493, viewed 559 times
    • pisco wrote:

      Then i mapped this way in cmd and i could map it but it is still showing as empty folder.


      Have you tried in another linux workstation if the mount is working? It could be that mount binds are not there, NFS in omv does mount binds from the share to /export/share1 /export/share2 and so on.

      check with mount | grep bind in terminal, also go to /export in OMV and you should see the shares there and their content

      I just checked with my w7 VM, and it works ok. Also did you check the permissions in the share? some people come here sometimes with stuff like 700 and ask why they don't work.
      New wiki
      chat support at #openmediavault@freenode IRC | Spanish & English | GMT+10
      telegram.me/openmediavault broadcast channel
      openmediavault discord server
    • Hi All,
      I think I've got the answer. According NFS manual only member of root user group or root itself can mount NFS share under windows. There is two ways how you can solve issue with mapping NFS under Windows:
      1. Mount your NFS share in windows using omv root user (map the drive with user root and password to your omv box)
      2. Create dedicated user in omv and same user in windows OS, both with same passwords. The account created in omv add to root user group in omv

      Using one of those options you should be able to connect NFS share in Windows
      Regards,

      The post was edited 1 time, last by danonh ().

    • That's partially true. NFS will honor filesystem permissions, so the UID of the user on the client has to match the UID of the user on the host. If you turn on "root_squash" on your NFS share, then root is not allowed to mount the filesystem. I would strongly recommend using "root_squash" as taking over an IP address on a network is pretty trivial.

      This article might be interesting: technet.microsoft.com/en-us/library/bb463218.aspx.

      With that being said, why are you using NFS on Windows anyway? Why not use SMB/CIFS, protocols native to Windows that support authentication and authorization out of the box (also possibly encryption?).