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

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驱动二进制版本下载地…

Nginx 在if语句中限制IP访问

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

You Missed

OpenClaw 完整使用指南:自托管 AI Agent 的架构与实战

  • u2
  • 2月 25, 2026
  • 61 views
OpenClaw 完整使用指南:自托管 AI Agent 的架构与实战

Anthropic 推出 Claude Code Security:AI 驱动的代码安全神器

  • u2
  • 2月 24, 2026
  • 47 views

来自 OWASP 的代码安全检查工具:Dependency-Check,为你消除安全隐患

  • u2
  • 10月 16, 2025
  • 26 views
来自 OWASP 的代码安全检查工具:Dependency-Check,为你消除安全隐患

技术宅如何躲开越来越垃圾的CSDN?

  • u2
  • 4月 11, 2024
  • 17 views
技术宅如何躲开越来越垃圾的CSDN?

mysql连接失败:The driver has not received any packets from the server

  • u2
  • 3月 26, 2024
  • 19 views
mysql连接失败:The driver has not received any packets from the server

几个IT小哥常用的工具挂图

  • u2
  • 3月 22, 2024
  • 6 views