Simple NFS share

  • I have installed OMV version 3.0.59 on a raspberry pi 3.


    My intent is to replace my existing NAS with the pi and 2 external usb hdd.


    My whole home network is Linux (Mint 17 & 18). I currently access my NAS via NFS by mounting the shares on it on my desktop in fstab with this line

    Code
    192.168.xx.xx:/public /media/user name/NASpublic		nfs	defaults	0	0


    All works perfectly, I am trying to emulate the same thing with OMV I have set up 2 folders on 1 of the usb hdd one is called "public" which I set up as everyone read / write. The other folder "backup" I set as Admin & users RW others RO and added two users. If I run showmount command from my desktop I get

    Code
    showmount -e 192.168.xx.xx
    Export list for 192.168.xx.xx:
    /export        *
    /export/Public *
    xxx@z170-m17 ~ $

    I can then created a temp directory called /mnt/omv-public which I then managed to mount and full access with the following command

    Code
    sudo mount -t nfs 192.168.xx.xx:/export/Public /mnt/omv-public

    But as you can see the "backup" folder is not visible I guess this is to with permissions when I set up the "back" folder I added two users which are the two user names of my desktop and my laptop which I want to give access.Here is a screenshot of my shared folders in the OMV WUI
    So how do I set up access to the "backup" folder for these two users?

    • Offizieller Beitrag

    Something is not right there because showmount is not displaying backup folder. You haven't configured the nfs server for the backup folder.
    This is nfs, so permissions valid in the server are valid for anyone who mounts and has the corresponding uid or gid. The rw/ro properties act globally not per user.
    If you want something more secure maybe try samba. Also you should add some options (no auto or use autofs) in the fstab line in case a laptop is outside the network otherwise boot will hang trying to reach the server.

  • OK getting there you are correct when I go to the NFS services I enabled the server on the folder "backup", the result of that it is now visible via showmount and when I go to the shared folders in the WUI folder now says "yes" under the "referenced column this was empty before.


    Now I have a new problem I can mount both the folders on my desktop & laptop (these are the 2 pc with usernames I have added under the shared folder privileges) all good there.
    However using another laptop which is not one of the users I can still mount the backup folder write & delete files? I want to restrict access to this folder to only the 2 users?


    How do I do this?


    As for Samba I was always led to believe NFS was more secure ? Linux Mint 17.3 seems to handle the lines in fstab even if it is connected to another network it never hangs.


    Thanks for your help I apreciate it

  • OK read the pinned thread and I understand the settings under shared folders/privileges has no effect when using NFS.
    I see you can restrict access globally under the NFS shares settings in the client box I can successfully restricy access the whole subnet by inputting 192.168.1.0/24.
    Is there anyway to restrict access in this box to the 1st 5 ip addresses in this box ie 192.168.1.0 to 192.168.1.4 ?


    cheers

  • Ah I wondered about that I did try comma separating since that is the same method in my ReadyNAS duo on NFS.


    Samba well I guess because I am now die hard linux and I have no windows machines on my network. From what I have read NFS performs faster.


    I suppose your point is if I use samba it is easier to lock it down per user just now.


    Can I convert an existing NFS share to samba or will that muck everything up?

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!