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