在 Linux 上,zfs 似乎支持 nfsv4acl
zfs set acltype=nfsv4 rpool/ROOT/nas
echo $?
0
我创建了一个 fs
zfs create -o mountpoint=/var/pub rpool/pub
并且...什么都没起作用
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.
我不知道还有其他任何实用程序可以管理 nfsv4acl。我错过了什么?
zfs 似乎已正确配置为使用 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
编辑:这个应用程序可能有效https://github.com/truenas/nfs4xdr-acl-tools问题是无法在 Slackware 15 上编译,所以我无法测试它
/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
我的理解是 Linux 的 ZFS 实现不支持 NFSv4 ACL。对于需要或受益于 NFSv4 ACL 的应用程序,您需要考虑使用 FreeBSD(或 Solaris,我相信)来托管您的 ZFS 池。
具体来说,
man zfsprops
(在 Ubuntu 22.04.4 LTS 上)表示: