Straight to the point, considerations at the end.
-
Create a new user in Credentials:
Username of your choice
Disable password
Create New Primary Group
Home Directory: /nonexistent
Home Directory Permissions: User (is this even relevant?)
Create Home Directory [ ]
SMB User [ ] -
Add a new NFS share:
Path: select the dataset you want to share
└ Advanced Options
Mapall User: use the user you created before
Mapall Group: use the group automatically created before
Hosts → Add → Authorized Hosts and IP addresses: write here Proxmox server’s IP or hostname if you want to be sure no other machine can access this share -
Datasets
Select the dataset connected to the NFS share
└ Scroll down the “Details” pane on the right until you see the “Permissions” section
└ Edit
User: select the user you created
Group: select the related group
Apply Group
Apply permissions recursively
Access Mode: the default selections should be fine as is
And that’s it.
Now, the reason why I struggled (a LOT) to make it work properly was because of a misunderstanding; a misunderstanding that TrueNAS’ documentation, evidently written with professionals in mind, could not clear.
Forum threads, on the other hand, (not just on TrueNAS’) not always catch the attention of the more knowledgeable users, which can lead to incomplete, erroneous or no replies at all. And that was all my googling skills could yield.
A little recap of my personal odissey as a newb.
I had done more or less everything right up to “New NFS share”, but I was completely oblivious of the Permissions section in the dataset details; more precisely, I had no idea it was pertinent to a NFS share.
The result was “Error 500” on Proxmox’s side.
On top of that, none of the tens of forum threads I perused, let alone the one I started myself, presented a correct and in-depth explanation of what was going wrong and how to fix it. The widespread agreement seemed to be that setting Mapall User/Group to “root/wheel” or “root/root” was the only way to make it work; unacceptable, no less.
Lucky me, I stumbled on a saint of a Discord user who displayed an inexhaustible amount of patience and helped me out of the swamp.