您的位置:首页 > 移动开发

CentOS挂载ubuntu下NFS服务故障解决(UID Mapping)

2014-05-21 11:08 260 查看

一. 前提

1. 采用ubuntu 12.04作为nfs-server, 具体安装参考[1] , 更加详细的参考见文章[2]
2. centos 6.5 作为nfs-client

二. 故障及解决

1. centos mount之后发现文件夹所属用户和用户组都为“1000”, 无法修改,无法访问。
2. 原因:ubuntu的UID从1000开始, 而centos UID从500开始,所以不对应(not mapping), 所以产生问题。 “On my Debian host system, standard UIDs start at 1000, while in the CentOS guest system, UIDs start at 501. Coincidentally, Mac OS X also starts UIDs at 501 — so
on their systems, the files were already owned by vagrant”, 摘自[3]
3. 解决: 在centos上修改uid和gid
usermod -u 1000 user
groupmod -g 1000 group


但会出现[4]中问题, 不过可以通过chown来解决

Reference

[1] ubuntu 12.04 nfs-server/client安装配置
[2] Linux NFS服务器的安装与配置
[3] Vagrant, NFS Synced Folders, Permissions, and Bindfs on CentOS 6
[4] 关于uid与gid的修改
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: