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
    • 最新
    • 标签
主页 / user-13015

baumgart's questions

Martin Hope
baumgart
Asked: 2014-04-24 04:07:01 +0800 CST

AIX 上的 NFSv4 权限

  • 2

我正在尝试在两个不共享 UID/GID 的系统上使用 NFSv4 挂载。这是针对旧环境使用任何可用的 UID/GID 的系统迁移,它们现在在新环境上发生冲突。我已经在新环境中为所有用户提供了新的非冲突 ID。

我的问题是 NFS 挂载。我正在尝试使用 NFSv4,因为它将 ID 作为字符串而不是数字(这应该有助于映射)传递。我可以在旧环境上安装一个文件系统,当我执行 时ls -l,我在两边都看到了正确的名称(因此映射正在工作)。

当我尝试以用户身份(两个系统上都存在具有不同 UID 的用户)触摸文件时,我的权限被拒绝。用户是两个系统上适当组的成员(该组在两个环境中具有不同的 GID,但用户是双方的适当成员)。

还有其他选项可以解决我的问题(使用 NFSv3 和重新映射 UID/GID),但如果可以避免的话,我不想这样做。


这是我的配置和一些测试,向您展示我所看到的......

服务器配置:

# chnfsdom
Current local domain: red.act.ed
# cat /etc/exports
/usr/sap/trans -vers=4,sec=sys,rw,root=172.29.4.56:172.29.4.55:172.29.4.65
# ls -ld /usr/sap/trans/data
drwxrwxr-x    2 d01adm   sapsys       118784 Apr 23 08:25 /usr/sap/trans/data
# ls -nld /usr/sap/trans/data
drwxrwxr-x    2 300      300          118784 Apr 23 08:25 /usr/sap/trans/data

客户端配置:

# chnfsdom
Current local domain: red.act.ed
# mount | grep trans
devbox   /usr/sap/trans   /usr/sap/trans   nfs4   Apr 23 09:01 vers=4
qabox:/ # ls -ld /usr/sap/trans/data
drwxrwxr-x    2 d01adm   sapsys       118784 Apr 23 09:25 /usr/sap/trans/data
qabox:/ # ls -nld /usr/sap/trans/data
drwxrwxr-x    2 8        14           118784 Apr 23 09:25 /usr/sap/trans/data

根据该信息,UID/GID 翻译似乎工作正常。这是摩擦(在客户端盒子上)......

qabox:q01adm> pwd
/usr/sap/trans
qabox:q01adm> ls -ld .
drwxrwxr-x   14 d01adm   sapsys         4096 Apr 23 09:56 .
qabox:q01adm> id
uid=12(q01adm) gid=14(sapsys) groups=0(system),7(security),4294967294(nobody),15(oper),16(dba)
qabox:q01adm> touch file
touch: 0652-046 Cannot create file.

这是我可以在同一个客户端上使用 root 执行的操作:

qabox:/usr/sap/trans # pwd
/usr/sap/trans
qabox:/usr/sap/trans # id
uid=0(root) gid=0(system) groups=2(bin),3(sys),7(security),8(cron),10(audit),11(lp),14(sapsys)
qabox:/usr/sap/trans # touch file
qabox:/usr/sap/trans # chown q01adm:sapsys file
qabox:/usr/sap/trans # ls -l file
-rw-r--r--    1 q01adm   sapsys            0 Apr 23 09:59 file
qabox:/usr/sap/trans # ls -nl file
-rw-r--r--    1 12       14                0 Apr 23 09:59 file

在服务器盒子上,我看到了这个:

# ls -l /usr/sap/trans/file
-rw-r--r--    1 q01adm   sapsys            0 Apr 23 08:59 /usr/sap/trans/file
# ls -nl /usr/sap/trans/file
-rw-r--r--    1 302      300               0 Apr 23 08:59 /usr/sap/trans/file

所以,从我所看到的一切......UID/GID 转换工作正常,我只是不能在客户端以非 root 用户身份写入文件。

permissions
  • 1 个回答
  • 4243 Views

Sidebar

Stats

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

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

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

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve