Configure Napp It NFS shares for mounting in Ubuntu 18

epicurean

Active Member
Sep 29, 2014
634
32
28
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
 

gea

Well-Known Member
Dec 31, 2010
2,479
835
113
DE
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.
 

epicurean

Active Member
Sep 29, 2014
634
32
28
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
 
Last edited:

gea

Well-Known Member
Dec 31, 2010
2,479
835
113
DE
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.
 

epicurean

Active Member
Sep 29, 2014
634
32
28
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?
 

gea

Well-Known Member
Dec 31, 2010
2,479
835
113
DE
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.
 

epicurean

Active Member
Sep 29, 2014
634
32
28
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
 

gea

Well-Known Member
Dec 31, 2010
2,479
835
113
DE
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?
 

epicurean

Active Member
Sep 29, 2014
634
32
28
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
 

gea

Well-Known Member
Dec 31, 2010
2,479
835
113
DE
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.
 

daisho

New Member
Apr 25, 2019
25
3
3
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
 
  • Like
Reactions: epicurean and gea

epicurean

Active Member
Sep 29, 2014
634
32
28
Sorry to bring this up again but the napp it NFS server is again blocking access to my ubuntu plex client
sytemctl status nfs-plex.mount shows access denied by server. Did as daisho suggested

Not sure what more I have to do to enable mounting by the ubuntu client. Windows client see the NFS /Samba shares fine
 

gea

Well-Known Member
Dec 31, 2010
2,479
835
113
DE
I would start with a open setting like NFS3 and no ip restriction (set nfs sharing simply to on) and all files set recursively to everyone@=modify. If you need access restricions, prefer SMB.

btw.
SMB on Solarish is mostly not SAMBA but the ZFS/inkernel SMB server.