Can't setup correct permissions on NFS

netvis

Cadet
Joined
Nov 23, 2022
Messages
3
Hi,
I mentioned a pretty strange behaviour, TrueNAS 13.

I created a share, all permissions for everybody (777). Now I waht to make it availible to everybody via NFS. As I have NIS directory, so users can be both NIS and local. A

At first I setup NFS as follows:
- No maproot user nor group
- All dirs and enabled on.

When I create a directory in this share I get it with correct permissions:
drwxrwxr-x 2 nfsnobody root 2 Nov 25 13:40 test1
That is ok.

Now I want to get rid of root permissions in this share and I setup:
- Maproot user: winuser (NIS provided user)
- Maproot group: dc (NIS provided group)

When I create a directory in this case I get it like this:
drwxrwxr-x 2 winuser root 2 Nov 25 13:42 test2
Ok, but why root group (GID=0) is here?

Ok then, now I login as winuser and create a directory. Winuser, by the way, has the following group membership:
uid=5020(winuser) gid=5000(dc) groups=5000(dc)
Now I create a directory and ... why does the GID turns to 0 (root)?
drwxrwxr-x 2 winuser root 2 Nov 25 13:45 test3
What I simply want is to make all new directories appear under their user's effective UIDs and GIDs but the root - it must be winuser/dc.
But it does not happen, I get promotion in GID instead. Is it a correct behaviour?
 
Top