CentOS-6.x配置NFS时,客户端UID显示为nobody的解决办法

  • linux
  • 3月 27, 2014
  • 0 评论

CentOS6.x的NFS配置跟CentOS5.x不太一样,不光是安装包及服务名变了,还总有各种古怪的事情,今天遇到了NFS客户端mount NFS之后目录的属主变成了nobody:nobody,折腾了半天,终于找到了解决办法:

本次案例:
OS: CentOS-6.5
NFS Server: 192.168.100.101 nfsserver.sudops.com
NFS Client: 192.168.100.102 nfsclient.sudops.com

服务端配置:

# cat /etc/exports
/data/storage 192.168.100.0/255.255.255.0(rw,sync,all_squash,anonuid=0,anongid=0)

# cat /etc/idmapd.conf
[General]
#Verbosity = 0
# The following should be set to the local NFSv4 domain name
# The default is the host's DNS domain name.
#Domain = local.domain.edu

改成

[General]
#Verbosity = 0
# The following should be set to the local NFSv4 domain name
# The default is the host's DNS domain name.
#Domain = local.domain.edu
Domain = sudops.com

重启NFS服务端

# /etc/init.d/nfs restart
# /etc/init.d/rpcbind restart
# /etc/init.d/rpcidmapd restart

客户端配置:
跟服务端一样也要修改/etc/idmapd.conf
重启客户端应用

# /etc/init.d/rpcbind restart
# /etc/init.d/rpcidmapd restart

重新mount

# umount -l /local/storage
# mount -t nfs 192.168.100.101:/data/storage/ /local/storage

这次终于跟NFS的export目录属主保持一致啦!

u2

Related Posts

python cx-Oracle 驱动安装

安装oracle驱动 cx-Oracle驱动二进制版本下载地…

Read more

Nginx 在if语句中限制IP访问

一些web服务,出于安全考虑是不想让其他人访问到,除了添加登录用户认证外,还可以使用Nginx限制IP访问,只允许指定IP的用户访问站点或者接口。

Read more

You Missed

Anthropic 指控阿里蒸馏攻击:AI 军备竞赛的拐点

  • u2
  • 6月 25, 2026
  • 34 views

当AI开始吃自己:数据污染正在成为大模型行业最隐秘的危机

  • u2
  • 6月 25, 2026
  • 38 views

Google 用 AI「杀死」Google

  • u2
  • 6月 22, 2026
  • 64 views

封禁Fable 5:当美国政府成为AI的”守门人”

  • u2
  • 6月 21, 2026
  • 88 views

27亿美元没留住的人,奥特曼等了十年

  • u2
  • 6月 19, 2026
  • 57 views

OpenAI Codex 发布角色插件:当AI开始理解「分析师」和「销售」是两种不同的物种

  • u2
  • 6月 15, 2026
  • 99 views
OpenAI Codex 发布角色插件:当AI开始理解「分析师」和「销售」是两种不同的物种