Connect TrueNAS VM to dataset via NFS4

I try to connect a TrueNAS (scale) VM to a TrueNAS dataset via NFS4. I managed to do that, however NOT with the intended security setup.

My intention is to define a dataset owned by the VM for which the dataset is intended like this:

  • owner ^Mister-VM^ all permissions
  • group ^Mister-VM^ not relevant / all permissions
  • others no permissions at all

So apart from root and ^Mister-VM^, not a single user has access to the dataset.

On the VM the intended setup is:

  • the dataset is mounted at start
  • permanently mounted not timeouts etc
  • accessible for a certain user group NOT having root permissions
  • one or more services are running as user-x,y,z.
  • those user(s) is member of the group having full NFS-share permissions

I have no idea how to do this !! :hot_face: :stuck_out_tongue_closed_eyes:

Of course If I run the service as root and /or I change the TrueNAS dataset permissions to “allow all for others” there it works!! But that is IMHO absolutely a bad idea !!

I hope someone knows how to get this done.

See my earlier post ^Setup TrueNAS VM having NFS-share via storage VLAN. Two issues!^ describing how to setup NFS4 (with permissions like I do NOT want them!!)