nfs挂载的目录出现nobody的解决办法
1,systemctl status rpc-statd.service 看到如下错误,
Failed to register (statd, 1, udp): svc_reg() err: RPC: Remote system error - No route to host
Failed to start NFS status monitor for NFSv2/3 locking..
解决办法:
systemctl enable rpcbind
systemctl start rpcbind
systemctl start nfs-server
systemctl start rpc-statd.service
2,文字显示如下属性:
drwxr-xr-x 46 nobody nobody 8065024 2月 24 16:05 picture
解决办法:切换到root用户
vim /etc/idmapd.conf
[Mapping]
Nobody-User =app_user
Nobody-Group = app_user
systemctl status rpcidmapd.service
systemctl restart rpcidmapd.service
ll
umount -l /picture
mount -t nfs 1.1.1.1:/image02/website/picture /picture
3,切换到app_user 用户下验证
参考文档:https://blog.51cto.com/kusorz/1750033
本文来自博客园,作者:春江潮水连海平,转载请注明原文链接:https://www.cnblogs.com/alonewaiting/p/14442339.html