Configure Napp It NFS shares for mounting in Ubuntu 18

Discussion in 'Solaris, Nexenta, OpenIndiana, and napp-it' started by epicurean, Oct 5, 2019.

  1. epicurean

    epicurean Member

    Joined:
    Sep 29, 2014
    Messages:
    543
    Likes Received:
    20
    I have searched extensively but either am too obtuse to see the answer or just plain missing it.
    I have configure an NFS share in Napp it , which has folders where put in my movies, tv shows for plex. I can see and move files freely to and from windows 10 to this NFS share.

    I wish to have a plex media server( as a docker) in Ubuntu 18, and I understand I must first mount these NFS shares in Ubuntu first. I keep getting permission errors . Can anyone point me to or help me to a idiot's guide for doing this?

    much thanks
     
    #1
  2. gea

    gea Well-Known Member

    Joined:
    Dec 31, 2010
    Messages:
    2,273
    Likes Received:
    752
    NFS v3 clients access the server either with their uid or as user nobody.
    To avoid filebased permission problems, set all files recursively to everyone@=modify
    (napp-it, CLI /usr/bin/chmod or Windows when SMB connected as root)

    When you share a filesystem via NFS, you can restrict access based on a client ip.
    Set nfs share simply to on to allow all clients.

    If you share a filesystem simultaniously via NFS and SMB, do not use chmod ex chmod 777 folder
    as chmod deletes then all ACL inheritance permissions (tradtional Unix permissions are not inheritance aware).
    Set ACL not traditional Unix permissions.
     
    #2
  3. epicurean

    epicurean Member

    Joined:
    Sep 29, 2014
    Messages:
    543
    Likes Received:
    20
    Thanks for responding Gea.
    Please assume I am an idiot, how exactly do I set all files recursively to everyone@=modify?

    update: oh crap..I did something and how I cannot even access the napp it folders even though I can see it
     
    #3
    Last edited: Oct 6, 2019
  4. gea

    gea Well-Known Member

    Joined:
    Dec 31, 2010
    Messages:
    2,273
    Likes Received:
    752
    Open napp-it menu "ZFS Filesystems" and then "ACL on folders" for a filesystem.
    Below the ACL listings, you find a menu "reset ACL".

    Select "modify" and enable the recursive checkbox.

    other option
    use Windows, connect as root and set ACL recursively.
     
    #4
  5. epicurean

    epicurean Member

    Joined:
    Sep 29, 2014
    Messages:
    543
    Likes Received:
    20
    Hi Gea,
    what you recommended is exactly what I did previously , and thus now unable to get into the napp it NFS shares from windows.
    Is there a way to redo this all over again?
    What do you mean by use windows, connect as root?
     
    #5
  6. gea

    gea Well-Known Member

    Joined:
    Dec 31, 2010
    Messages:
    2,273
    Likes Received:
    752
    If something went wrong, reset the permissions again (napp-it ACL on folder)

    If you share a filesystem via NFS and SMB, you can also login from Windows via SMB. If you connect as user root you have full permissions to reset permissions from the Windows folder property tab.
     
    #6
  7. epicurean

    epicurean Member

    Joined:
    Sep 29, 2014
    Messages:
    543
    Likes Received:
    20
    I rebooted the windows PC(after reseting the permissions again) and able to access the folders again.
    However when I tried to mount the folder in ubuntu, I get this error:
    mount.nfs: access denied by server while mounting 192.168.0.226:/plex/Movies
     
    #7
  8. gea

    gea Well-Known Member

    Joined:
    Dec 31, 2010
    Messages:
    2,273
    Likes Received:
    752
    Do you have a Mac (or Windows with NFS client installed) where you can test
    if the problem is on OmniOS or Linux side

    On a Mac, enter (connect to server): nfs://192.168.0.226/plex/Movies

    NFS works, if everyone has write permissions to the filesystem and the filesystem is not set to readonly. Filesystem is uppercase Movies?
     
    #8
  9. epicurean

    epicurean Member

    Joined:
    Sep 29, 2014
    Messages:
    543
    Likes Received:
    20
    Hi Gea, I am on Windows 10. I can read and write in the Napp It NFS shares with no problems.
    Yes, file system is uppercase Movies
     
    #9
  10. gea

    gea Well-Known Member

    Joined:
    Dec 31, 2010
    Messages:
    2,273
    Likes Received:
    752
    If it works with Windows Pro (NFS client installed, to be sure it's NFS, disable SMB) you need to check Ubuntu where I cannot help too much as I do not use quite often.
     
    #10
  11. daisho

    daisho New Member

    Joined:
    Apr 25, 2019
    Messages:
    20
    Likes Received:
    1
    Hi,

    I also had some problems mounting NFS or SMB shares on ZFS via Ubuntu (which I use for e.g. web server or plex server).
    Maybe it helps when I post how it is configured (working) for me:

    On the ubuntu server I have a line in /etc/fstab to auto-mount at every startup like this:
    Code:
    10.x.x.x:/storage/nfs /mnt/cloud nfs
    Where 10.x.x.x is the IP address of the napp-it fileserver, /storage/nfs my storage pool, /mnt/cloud the directory on the ubuntu server where to mount the NFS share to and the last "nfs" to tell mount that this is a NFS share

    I think there is a package required on a clean ubuntu machine to be able to mount NFS shares but I am sure you already have that or can be found very easily via Google.

    I am not sure if everything is necessary but I post it nevertheless:
    My Ubuntu user which is running all necessary processes (e.g. web server that accesses the mounted shares) has e.g. UID 115 and GID 1001.
    What solved the problem that on the ZFS (napp-it) machine the linux user was not properly mapped, was to configure that in /etc/idmapd.conf on the Ubuntu machine:

    Domain = <YOUR DOMAIN>

    On the ZFS machine, make sure you set it to the same value:
    # sharectl set -p nfsmapid_domain=<YOUR DOMAIN> nfs
    (posted that here not long ago: https://forums.servethehome.com/ind...-storage-pool-with-linux-ubuntu-server.25555/)

    On napp-it I also have users with the same name as on the Ubuntu servers with the same UID (user ID; not sure if GID is also necessary but I may also have added my Ubuntu users to GID 10 which by default is the UUCP group I think?)

    NFS properties of my pool is set to sec=sys,rw=@10.x.x.x/24,root=... (rw=@10.x.x.x/yy for giving read/write access to the Ubuntu machine which has to mount the share).
    On ZFS ACL for folders it is important that not only the desired folder (plus subfolders) like /storage/nfs/movies has the needed rights but also that the "lower" root folders give that user at least e.g. readxs_set rights so the machine that want to mount the share (I think NFS mount only works for the pool/nfsshare itself but no subfolders like pool/nfsname/movies), otherwise the mount user cannot read the directory list for the folders.

    For example my pool looks like this:

    /storage (this is the pool itself, no ACL here)
    /storage/nfs (this is one of my NFS file systems, webserver user has e.g. readxs_set rights here)
    /storage/nfs/www (this is the base web folder on my share, the webserver user has e.g. full_set rights here)


    Hope this helps in solving that riddle.

    Best regards,
    daisho
     
    #11
    gea likes this.
Similar Threads: Configure Napp
Forum Title Date
Solaris, Nexenta, OpenIndiana, and napp-it Napp-it Virtual Machine Memory Usage Critical Wednesday at 2:29 PM
Solaris, Nexenta, OpenIndiana, and napp-it Can I safely delete the napp-it-18.12.zip, nappit2.sh, & setup-napp-it.log files after installing? Dec 9, 2019
Solaris, Nexenta, OpenIndiana, and napp-it Napp-IT --> QNAP Migration Dec 3, 2019
Solaris, Nexenta, OpenIndiana, and napp-it How to install Napp-it on OI Hipster 2019.10 GUI + Must I really reset root password after install? Dec 2, 2019
Solaris, Nexenta, OpenIndiana, and napp-it Napp-It not scaling well ... - revisited ;) Nov 20, 2019

Share This Page