NFS shares are mounted as "nobody"

PhoenixWeb

Dabbler
Joined
Jul 15, 2016
Messages
11
Dear all,

we need to mount a NFS partition on a cPanel system in order to store backups.
We have an issue with permission because all data on the NFS partition are reset to "nobody" user.
Because of this setting cPanel create a backup with partial failure status (due to permissions).

On my older NFS storage server i used to just apply the flag "no_root_squash" and mount it with noexec options. But i cannot replicate this behaviour on FREENAS.

Can somebody help me to re-config the server in order to have right permission on the client filesystem.

Thanks!
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,681
So you've set the maproot user to root, and the maproot group to wheel? Or not? If not, go into the advanced options for the share and set it that way. Root by default gets mapped to nobody because root is relatively powerful.
 

PhoenixWeb

Dabbler
Joined
Jul 15, 2016
Messages
11
I've set mapall user to root and mapall group to wheel because only root can access to this system.
Then I just need to map root as root.

.... i'm gonna to try your solutions.
Maybe it was just that easy! :)
 

PhoenixWeb

Dabbler
Joined
Jul 15, 2016
Messages
11
.... No
try to move from "mapall" to "maproot" and get the same result.

/backup is mounted as nobody:nobody
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,681
If mapall doesn't work, it isn't clear to me what the actual issue here is. mapall is the "big gun".
 

PhoenixWeb

Dabbler
Joined
Jul 15, 2016
Messages
11
Everything seems fine on the server.
But when I mount the NFS partition on the client I see it as "nobody:nobody" on clientside.
I can use it read/write, but I need that the client sees those file as "root:root" and not "nobody:nobody".
Access to that directory must be root only.
 

nello

Patron
Joined
Dec 30, 2012
Messages
351
Everything seems fine on the server.
But when I mount the NFS partition on the client I see it as "nobody:nobody" on clientside.
I can use it read/write, but I need that the client sees those file as "root:root" and not "nobody:nobody".
Access to that directory must be root only.
Did you figure out how to do this?
 
Joined
Sep 28, 2016
Messages
1
Most likely you have configured the NFS service to enable NFSv4 and you have a different domain on your server and client. If you don't need v4 turn that feature off in the services sectiion and restart the NFS deamon. You should then be able to mount fine form any v3 client.
 

bmoreitdan

Dabbler
Joined
Oct 16, 2018
Messages
30
This thread lead me to find the answer needed for this issue with 11.2-RELEASE.

In the Services > NFS > there's an option called "NFSv3 ownership model for NFSv4" which allows me to establish a v4 connection but effectively have the no_root_squash functionality. Also, I needed to mapall to root:wheel.
 

kmklv

Cadet
Joined
Sep 16, 2019
Messages
9
Same here with 11.2.u6. I had the same files shared smb rw for windows users and nfs ro for linux users and while root user on linux would be able to access it, non-root user wouldn't be able to read the folder at all. What bmoreitdan did is what I ended up with to make it accessable.
 

darkmode

Dabbler
Joined
Aug 17, 2021
Messages
12
In the Services > NFS > there's an option called "NFSv3 ownership model for NFSv4" which allows me to establish a v4 connection but effectively have the no_root_squash functionality. Also, I needed to mapall to root:wheel.


Just wanted to say in 2021 that this is what I needed to use TrueNAS for my NFS4 mounts.

I host my container persistent storage on a general purpose Linux server using NFS4, and it was necessary to get "rw,no_root_squash,sync,no_subtree_check" like functionality in order for my container workloads to transition to TrueNAS backed storage.

So far so good.
 
Top