NFS shares: files and folders owner:group

NismoC32

Cadet
Joined
Aug 6, 2018
Messages
6
The files and folders shared from my FreeNAS server to clients get nobody/nobody as user and group owner for
files and folders. I cant change this from the client, I get: I don’t have permission to change them.

How do I set this up so I get the original user and group owner shown and
have the possibility to change them like I have on all the other NFS shares
from my qnap nas and my Gentoo fileserver ?

I need to be able to set the rights and owner of files and folders the same way I do a locally mounted storage.
Also I could not find a place to set nfs settings like: no_root_squash etc. in the GUI

PS: I have NFSv4 enables in the GUI and allow non root mount
 
Last edited:

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
Sounds like your datasets need real owners.
 

NismoC32

Cadet
Joined
Aug 6, 2018
Messages
6
I'm not sure what you mean.

My Datasets has the following settings
ACL = Unix
User = "My username" Same as used on all my computers with UID 1000.
Group = "users" Same as used an all my computers with GID 100.
Permissions = 777

NFS Service settings:
No changes to any of the bind (IP/port) settings
Allow non root mounts = Enabled
Enable NFSv4 = Enables
The rest is disabled.

NFS Sharing settings:
Everything default (Empty)
Security = sys (Had to choose one here) not sure what "sys" implies though.

When I go to the NFS share on my Linux WorkStation and create a new folder it gets the following rights:
0775 nobody:nobody
I can change the Permissions but not owner or group of the folder,
the same goes for files. If I try I get this error message: "Invalid argument"
If I copy a file to the NFS share it changes the owner and group to nobody:nobody but the Permissions are kept.

I have no idea how to set it up to behave like I want:
Simpy put I want the NFS Share to behave like any other local folders/files on a Linux machine

Is this possible ? If so how do you go about doing it, what I'm I doing wrong.
 

Attachments

  • Dataset Permisions.png
    Dataset Permisions.png
    45.7 KB · Views: 1,038
  • NFS Service.png
    NFS Service.png
    35.4 KB · Views: 988
  • NFS Share.png
    NFS Share.png
    29.4 KB · Views: 935
  • Pool and dataset.png
    Pool and dataset.png
    35.3 KB · Views: 848
  • CLI chown.png
    CLI chown.png
    15.5 KB · Views: 882
Last edited:

NismoC32

Cadet
Joined
Aug 6, 2018
Messages
6
Made some progress:
I managed to get files keeping their owner:group and Permission when I'm logged inn as root on my client PC
But as a user, the files get their group changed to that of the Dataset permission and the user is root (From mapall=root i guess) WHY!
I can however change the owner:group now as a user.

This is what I have changed:
mapall=root (Without this, users can't change owner:groups)
Enabled NFSv3 ownership model for NFSv4

It looks like it's impossible to get the NFS Share on FreeNAS to respect owner:group of file going in and out of
it's shares as a user (Please prov me wrong)
 
Last edited:

Rae Brown

Cadet
Joined
Jan 4, 2017
Messages
5
I'm not sure what you mean.

My Datasets has the following settings
ACL = Unix
User = "My username" Same as used on all my computers with UID 1000.
Group = "users" Same as used an all my computers with GID 100.
Permissions = 777

NFS Service settings:
No changes to any of the bind (IP/port) settings
Allow non root mounts = Enabled
Enable NFSv4 = Enables
The rest is disabled.

NFS Sharing settings:
Everything default (Empty)
Security = sys (Had to choose one here) not sure what "sys" implies though.

When I go to the NFS share on my Linux WorkStation and create a new folder it gets the following rights:
0775 nobody:nobody
I can change the Permissions but not owner or group of the folder,
the same goes for files. If I try I get this error message: "Invalid argument"
If I copy a file to the NFS share it changes the owner and group to nobody:nobody but the Permissions are kept.

I have no idea how to set it up to behave like I want:
Simpy put I want the NFS Share to behave like any other local folders/files on a Linux machine

Is this possible ? If so how do you go about doing it, what I'm I doing wrong.
Can you please tell if you were able to fix the chown issues?
 

KrisBee

Wizard
Joined
Mar 20, 2017
Messages
1,288
@Rae Brown It might be better if you created a new thread with a clear statement of what your problem is.
 
Top