Register for the iXsystems Community to get an ad-free experience and exclusive discounts in our eBay Store.

NFS shares are mounted as "nobody"

PhoenixWeb

Newbie
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
Moderator
Joined
May 29, 2011
Messages
12,322
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

Newbie
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

Newbie
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
Moderator
Joined
May 29, 2011
Messages
12,322
If mapall doesn't work, it isn't clear to me what the actual issue here is. mapall is the "big gun".
 

PhoenixWeb

Newbie
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

FreeNAS Experienced
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

Newbie
Joined
Oct 16, 2018
Messages
20
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.
 
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.
 
Top