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

一年前让英伟达蒸发6000亿美元的中国AI,现在被黄仁勋请上了CES的PPT

  • u2
  • 6月 7, 2026
  • 28 views

当AI开始”破坏”:Anthropic告诉我们,每个用户都该重新审视自己的使用方式

  • u2
  • 6月 6, 2026
  • 33 views

10款大模型同台黑客测试:GPT-5.5拿了王冠,DeepSeek便宜15倍,Gemini直接退赛

  • u2
  • 6月 5, 2026
  • 35 views

30天,0天,90天:一纸行政令,把AI公司的”自由发布”踩了急刹车

  • u2
  • 6月 4, 2026
  • 44 views

AI很厉害,可你省的人力费还不够买Token!

  • u2
  • 6月 2, 2026
  • 61 views

RSI取代AGI成为新热词:AI能自我进化吗?

  • u2
  • 5月 30, 2026
  • 122 views