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

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM