AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / unix / 问题 / 789026
Accepted
elbarna
elbarna
Asked: 2025-01-03 07:14:36 +0800 CST2025-01-03 07:14:36 +0800 CST 2025-01-03 07:14:36 +0800 CST

Openzfs、Linux 和 nfsv4 acl

  • 772

在 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
zfs
  • 1 1 个回答
  • 27 Views

1 个回答

  • Voted
  1. Best Answer
    Jim L.
    2025-01-04T00:59:06+08:002025-01-04T00:59:06+08:00

    我的理解是 Linux 的 ZFS 实现不支持 NFSv4 ACL。对于需要或受益于 NFSv4 ACL 的应用程序,您需要考虑使用 FreeBSD(或 Solaris,我相信)来托管您的 ZFS 池。

    具体来说,man zfsprops(在 Ubuntu 22.04.4 LTS 上)表示:

     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

相关问题

  • 亚马逊 Linux AMI 上的 ZFS

  • 适用于 Linux 的 Windows 子系统上的 OpenZFS

  • 暂停“zfs 通过 PV 发送”并恢复的最佳方法是什么

  • 如果禁用校验和,ZFS 使用非 ECC RAM 是否更安全?

  • 为什么 ZFS 不报告磁盘已降级?

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    模块 i915 可能缺少固件 /lib/firmware/i915/*

    • 3 个回答
  • Marko Smith

    无法获取 jessie backports 存储库

    • 4 个回答
  • Marko Smith

    如何将 GPG 私钥和公钥导出到文件

    • 4 个回答
  • Marko Smith

    我们如何运行存储在变量中的命令?

    • 5 个回答
  • Marko Smith

    如何配置 systemd-resolved 和 systemd-networkd 以使用本地 DNS 服务器来解析本地域和远程 DNS 服务器来解析远程域?

    • 3 个回答
  • Marko Smith

    dist-upgrade 后 Kali Linux 中的 apt-get update 错误 [重复]

    • 2 个回答
  • Marko Smith

    如何从 systemctl 服务日志中查看最新的 x 行

    • 5 个回答
  • Marko Smith

    Nano - 跳转到文件末尾

    • 8 个回答
  • Marko Smith

    grub 错误:你需要先加载内核

    • 4 个回答
  • Marko Smith

    如何下载软件包而不是使用 apt-get 命令安装它?

    • 7 个回答
  • Martin Hope
    user12345 无法获取 jessie backports 存储库 2019-03-27 04:39:28 +0800 CST
  • Martin Hope
    Carl 为什么大多数 systemd 示例都包含 WantedBy=multi-user.target? 2019-03-15 11:49:25 +0800 CST
  • Martin Hope
    rocky 如何将 GPG 私钥和公钥导出到文件 2018-11-16 05:36:15 +0800 CST
  • Martin Hope
    Evan Carroll systemctl 状态显示:“状态:降级” 2018-06-03 18:48:17 +0800 CST
  • Martin Hope
    Tim 我们如何运行存储在变量中的命令? 2018-05-21 04:46:29 +0800 CST
  • Martin Hope
    Ankur S 为什么 /dev/null 是一个文件?为什么它的功能不作为一个简单的程序来实现? 2018-04-17 07:28:04 +0800 CST
  • Martin Hope
    user3191334 如何从 systemctl 服务日志中查看最新的 x 行 2018-02-07 00:14:16 +0800 CST
  • Martin Hope
    Marko Pacak Nano - 跳转到文件末尾 2018-02-01 01:53:03 +0800 CST
  • Martin Hope
    Kidburla 为什么真假这么大? 2018-01-26 12:14:47 +0800 CST
  • Martin Hope
    Christos Baziotis 在一个巨大的(70GB)、一行、文本文件中替换字符串 2017-12-30 06:58:33 +0800 CST

热门标签

linux bash debian shell-script text-processing ubuntu centos shell awk ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve