freebsd with NFSv4

Hi guys;

I am trying to setup NFS share to another freebsd client. but I don't know why it always show
Code:
kernel: mount_nfs: nmount: /data: Permission denied
if I use
Code:
mount freebsd1:/data /data
and it will show
Code:
freebsd1:/data on /data (nfs)
But I want nfsv4acls feature on. What't the problem?
server conf;
rc.conf
Code:
nfs_server_enable="YES"
nfsv4_server_enable="YES"
nfsuserd_enable="YES"
client conf;
rc.conf
Code:
zfs_enable="YES"
nfs_client_enable="YES"
nfs_client_flags="-n 4"
rpc_lockd_enable="YES"
rpc_statd_enable="YES"
fstab
Code:
freebsd16:/data3   /data3  nfs rw,bg,late,failok,nfsv4  0 0
 
What's your /etc/exports file look like?

Unfortunately, this is one area where the handbook is lacking information.
 
/etc/exports
Code:
V4: / -sec=sys:krb5:krb5i:krb5p
/data    -alldirs -maproot=root -network=192.168.0.0/24
 
The permission should change to root:wheel? Currently a user was it's owner.
I just want to setup ACLs, whatever v4 or v3.
When I use "setfacl -R -a 0 g:"Domain\Unix Admins":full_set:fd:allow /data" to change the nfs share it will show. Does this related to NFSv4?
Code:
acl_get_link_np() failed: Operation not supported
 
After I add "nfsuserd_enable="YES"" to the rc.conf. and It's mounted. but in the client why the permission was nobody?
Code:
total 33
drwxr-xr-x   3 nobody  nogroup   3 Jul 29 14:30 nfsshare/
 
Are you using kerberos for authentication? If so then what have you done.
Your options for NFSv4 are to use sys security as the first instance. It will use that if it's available, which it is.

Your acl issue looks like the acl was not set when NFS wants to get it. Are you using a custom kernel without UFS_ACL? Are you using UFS or ZFS?

What does getfacl of the directory show?

I do recall NFS ACLs don't work/didn't work on FreeBSD's UFS. Perhaps someone else can clarify?
 
The client was using UFS, server was ZFS, after add
Code:
nfsuserd_flags=" -manage-gids"
to the rc.conf. now the permission seems OK.
 
Back
Top