Issue with user mapping when mounting nfs share on Ubuntu 18.04

zerorl985

Cadet
Joined
May 16, 2017
Messages
4
Hello. I'm building my new media server on Ubuntu 18.04. Previously It was on 16.04. I've copied the fstab setting directly over from my old server which has been working fine. The share is able to mount but there's a permissions issue. The permissions are set as "1001:1001". The only way I'm able to access the share is if I am root user. Unchecking the "NFSv3 ownership model for NFSv4" causes the permissions to read "nobody:4294967294"

Not sure what I am missing here. But I believe it's an issue with matching my UID on freenas and my ubuntu server.

fstab
Code:
10.18.1.21:/mnt/download/download /mnt/download nfs defaults 0 0


Any help would be appreciated.
 

KrisBee

Wizard
Joined
Mar 20, 2017
Messages
1,288
What you've called "permissions" are actually the user and group ids of any file/directory you've listed on your new Ubuntu server. If you're only seeing numeric values for uid & gid in "ls" output on your Ubuntu server, it simply means there's no user on the Ubuntu server with a uid/gid of 1001/1001. The output of getent group and getent passwd would confirm that. What non-root users have you added to your new Ubuntu server?

P.S. The reason why unchecking the "NFSv3 ownership model for NFSv4" causes the permissions to read "nobody:4294967294" is explained here: https://mwl.io/archives/796

So unless you plan to start using NFSv4 with kerboros, I'd stick to using NFSv4 with the NFsv3 ownership model.
 
Last edited:

zerorl985

Cadet
Joined
May 16, 2017
Messages
4
Hi, thanks for the reply
I've created a non-root user called zero on both freenas and ubuntu. I've set permissions on the dataset and on the share I've set the "Maproot User" and Maproot Group" to zero.

freenas:
zero:*:1001:zero
ubuntu:
zero:x:1000:
 

KrisBee

Wizard
Joined
Mar 20, 2017
Messages
1,288
It's staring you in the face: UID/GID of "zero" on FreeNAS and Ubuntu do not match.
 

zerorl985

Cadet
Joined
May 16, 2017
Messages
4
That's what I thought the issue was. So I can just modify the UID on ubuntu and it should be resolved.
 

KrisBee

Wizard
Joined
Mar 20, 2017
Messages
1,288
@zerorl985 You ought to mark this thread as solved.
 
Top