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

 

posted @ 2021-02-24 16:47  春江潮水连海平  阅读(1702)  评论(0编辑  收藏  举报