I use FreeNAS 9.1.1 and i share a zfs dataset with nfs. The user nfslocal and the group has the id 2300.
On the FreeNAS (#) the exports looks like the following:
The directory which is shared has the following permissions set:
Now on the linux client side (>>) when i create a file as restricted user or as root the gid is always 0.
As user:
Or as root:
The users and groups on the FreeNAS are imported from ldap and are available:
I don't know what i have to configure that i can get it to work... i have found a NAS4Free bugreport maybe the same is valid for FreeNAS:
* http://sourceforge.net/p/nas4free/bugs/88/
On the FreeNAS (#) the exports looks like the following:
# cat /etc/exports
/mnt/myvol/mydataset -maproot=nfslocal:nfslocal -network 192.168.30.0/24
The directory which is shared has the following permissions set:
# ls -lahrtd /mnt/myvol/mydataset/
drwxrwxrwx 2 root wheel 17B Oct 17 13:45 /mnt/myvol/mydataset/
Now on the linux client side (>>) when i create a file as restricted user or as root the gid is always 0.
As user:
>> touch test.txt
>> id
uid=44380(myuser) gid=3500(mygroup) groups=3500(mygroup) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023
>> ls -lahrtn
total 13K
-rw-------. 1 44380 0 0 17. Okt 16:22 test.txt
drwxrwxrwx. 2 0 0 3 17. Okt 16:39 .
drwxr-xr-x. 3 0 0 0 18. Okt 09:06 ..
Or as root:
>> touch test_as_root.txt
>> id
uid=0(root) gid=0(root) groups=0(root) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023
>> ls -lahrtn
total 13K
drwxr-xr-x. 3 0 0 0 Oct 18 09:06 ..
-rw-r--r--. 1 2300 0 0 Oct 18 09:09 test_as_root.txt
drwxrwxrwx. 2 0 0 3 Oct 18 09:09
The users and groups on the FreeNAS are imported from ldap and are available:
# getent group |grep nfslocal
nfslocal:*:2300
# getent passwd |grep nfslocal
nfslocal:*:2300:2300:Installation User:/u/nfslocal:/bin/sh
I don't know what i have to configure that i can get it to work... i have found a NAS4Free bugreport maybe the same is valid for FreeNAS:
* http://sourceforge.net/p/nas4free/bugs/88/