1

On Linux zfs seems to support nfsv4acl

zfs set acltype=nfsv4 rpool/ROOT/nas echo $? 0 

I create a fs

zfs create -o mountpoint=/var/pub rpool/pub 

and...nothing works

nfs4_setfacl -e /var/pub Failed to instantiate ACL. nfs4_setfacl -a A:fd:OWNER@:rwaDdxtTnNy,A:GROUP@:rwaDdxtTnNy,D:fd:EVERYONE@:rwaDdxtTnNy /var/pub Failed to instantiate ACL. 

I don't know any other utilities to manage nfsv4acl. What I miss?

zfs seems correctly configured to use nfs4acl

rpool acltype nfsv4 local rpool/ROOT acltype nfsv4 local rpool/ROOT/nas acltype nfsv4 local rpool/ROOT/nas@26-12-2024 acltype nfsv4 inherited from rpool/ROOT/nas rpool/pub acltype nfsv4 local rpool/root acltype nfsv4 inherited from rpool rpool/tmp acltype nfsv4 inherited from rpool 

EDIT: probably this app works https://github.com/truenas/nfs4xdr-acl-tools the problem is don't compile on Slackware 15 so I cannot test it

/usr/bin/libtool --mode=link gcc -o nfs4xdr_torture nfs4xdr_torture.o ../libnfs4acl/libnfs4acl.la -lattr libtool: link: gcc -o nfs4xdr_torture nfs4xdr_torture.o ../libnfs4acl/.libs/libnfs4acl.a -lbsd -ljansson -lattr /usr/bin/ld: ../libnfs4acl/.libs/libnfs4acl.a(nfs4_json_to_acl.o):/root/nfs4xdr-acl-tools/libnfs4acl/../include/nfs4_json.h:54: multiple definition of `flags2txt'; ../libnfs4acl/.libs/libnfs4acl.a(nfs4_ace_to_json.o):/root/nfs4xdr-acl-tools/libnfs4acl/../include/nfs4_json.h:54: first defined here /usr/bin/ld: ../libnfs4acl/.libs/libnfs4acl.a(nfs4_json_to_acl.o):/root/nfs4xdr-acl-tools/libnfs4acl/../include/nfs4_json.h:67: multiple definition of `perms2txt'; ../libnfs4acl/.libs/libnfs4acl.a(nfs4_ace_to_json.o):/root/nfs4xdr-acl-tools/libnfs4acl/../include/nfs4_json.h:67: first defined here /usr/bin/ld: ../libnfs4acl/.libs/libnfs4acl.a(nfs4_json_to_acl.o):/root/nfs4xdr-acl-tools/libnfs4acl/../include/nfs4_json.h:87: multiple definition of `type2txt'; ../libnfs4acl/.libs/libnfs4acl.a(nfs4_ace_to_json.o):/root/nfs4xdr-acl-tools/libnfs4acl/../include/nfs4_json.h:87: first defined here /usr/bin/ld: ../libnfs4acl/.libs/libnfs4acl.a(nfs4_json_to_acl.o):/root/nfs4xdr-acl-tools/libnfs4acl/../include/nfs4_json.h:98: multiple definition of `aclflags2txt'; ../libnfs4acl/.libs/libnfs4acl.a(nfs4_ace_to_json.o):/root/nfs4xdr-acl-tools/libnfs4acl/../include/nfs4_json.h:98: first defined here /usr/bin/ld: ../libnfs4acl/.libs/libnfs4acl.a(nfs4_json_to_acl.o):/root/nfs4xdr-acl-tools/libnfs4acl/../include/nfs4_json.h:107: multiple definition of `basicperms2txt'; ../libnfs4acl/.libs/libnfs4acl.a(nfs4_ace_to_json.o):/root/nfs4xdr-acl-tools/libnfs4acl/../include/nfs4_json.h:107: first defined here /usr/bin/ld: ../libnfs4acl/.libs/libnfs4acl.a(nfs4_json_to_acl.o):/root/nfs4xdr-acl-tools/libnfs4acl/../include/nfs4_json.h:117: multiple definition of `basicflags2txt'; ../libnfs4acl/.libs/libnfs4acl.a(nfs4_ace_to_json.o):/root/nfs4xdr-acl-tools/libnfs4acl/../include/nfs4_json.h:117: first defined here collect2: error: ld returned 1 exit status gmake[1]: *** [../include/buildrules:47: nfs4xdr_torture] Error 1 make: *** [Makefile:53: default] Error 2 

1 Answer 1

2

My understanding is that Linux's ZFS implementation does not support NFSv4 ACLs. For applications that require or benefit from NFSv4 ACLs, you'll want to look at FreeBSD (or Solaris, I believe) to host your ZFS pool.

Specifically, man zfsprops (on Ubuntu 22.04.4 LTS) says:

 acltype=off|nfsv4|posix Controls whether ACLs are enabled and if so what type of ACL to use. When this property is set to a type of ACL not supported by the current platform, the behavior is the same as if it were set to off. off default on Linux, when a file system has the acltype property set to off then ACLs are disabled. noacl an alias for off nfsv4 default on FreeBSD, indicates that NFSv4-style ZFS ACLs should be used. These ACLs can be managed with the getfacl(1) and setfacl(1). The nfsv4 ZFS ACL type is not yet supported on Linux. posix indicates POSIX ACLs should be used. POSIX ACLs are specific to Linux and are not functional on other platforms. POSIX ACLs are stored as an extended attribute and therefore will not overwrite any existing NFSv4 ACLs which may be set. posixacl an alias for posix 
1
  • Thanks, very strange the zfs set acltype=nfsv4 rpool/ROOT/nas don't return error Commented Jan 3 at 19:15

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.