nfs share permission denied

lewisxy

Cadet
Joined
Jul 12, 2023
Messages
5
I installed the TrueNAS SCALE 22.12.3.2, and imported my old pool (from a TrueNAS core server). I then configured the SMB and NFS share. The SMB share works flawlessly. However, the NFS share does not work. When I tried to mount the NFS share on a Linux machine from command line (as root).

Code:
mount <server_ip>:/mnt/my-pool/my-share/ /mnt/my-share/

The command does not throw any error. However, when I try to get into the directory using cd, it gives me permission denied error
Code:
bash: cd: my-share Permission denied


In my NFS configuration, I configured mapall user and mapall group to a specific user and group. I tried from the TrueNAS shell and confirmed that this user and group has access to the shared test.

Since the shared dataset resides on an old drive, it uses NFSv4 ACL. I already changed the permission to ensure the mapall user and mapall group has "Modify" permission on the dataset.

So I am not sure what's the issue nor how to further troubleshoot this.

UPDATE:
I did some more experiment. I found the only way for it work is to change the owner of the shared dataset to the mapall user (it was root). In other words, let's say there is a low privilege user called "a" (and there is a group called "a" associated with this user). "mapall user" and "mapall group" in the NFS share configuration is both configured to "a". The ACL of the dataset is quite standard (owner has "Full Control", group has "Modify", and everyone has none). The owner is root and the group is "a". NFS only works when I change the owner to "a" as well.

I am not sure why I have to this. SMB share works on the same underlying dataset without making this change.
 
Last edited:

thaddeusf

Cadet
Joined
Jan 16, 2024
Messages
6
This is exactly the problem I'm having with a new TrueNAS install and imported dataset from Core. I might not understand your update - I've changed the owner and ACL to user "a" (using your naming example). No change. Can you further detail what you did? Thanks.
 

NC_Sketchy

Cadet
Joined
Jun 21, 2020
Messages
2
This is probably too old, but make sure you have X permissions on your directory
if you cannot CD into it but you can do
ls /your/path, that's likely the issue
 
Top