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

MCP Gateway 完全指南:企业级 AI Agent 的控制平面

  • u2
  • 5月 17, 2026
  • 26 views

技术深度解析:Model Context Protocol (MCP)

  • u2
  • 5月 16, 2026
  • 33 views

Hermes Agent 自动学习与成长原理深度解读

  • u2
  • 5月 14, 2026
  • 64 views

Agent Memory + Skills 双轮驱动 Memori Labs × Anthropic Dreaming 执行记忆 vs 会话记忆,如何构建持续进化的 Agent

  • u2
  • 5月 11, 2026
  • 83 views
Agent Memory + Skills 双轮驱动 Memori Labs × Anthropic Dreaming 执行记忆 vs 会话记忆,如何构建持续进化的 Agent

基于大模型的测试用例生成解决方案

  • u2
  • 5月 10, 2026
  • 91 views

从0到1搭建一个AI Token中转站:技术架构与实战指南

  • u2
  • 5月 2, 2026
  • 693 views