Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

"access denied by server while

2025-03-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

NFS is a very general and simple sharing protocol under Linux, but it was recently installed and the error "access denied by server while mounting" occurred when another CentOS was mounted with mount.

Because NFS has been configured many times before, there has been no problem, so first try to mount it on the local mount. The test can be mounted, but an error is reported on another machine. The first thing that comes to mind is the iptables firewall problem, so turn off the firewall and report the same error.

Went to the Internet to search, many people encountered this error, but the reasons are not the same, here I would like to summarize several reasons for this error:

1. Illegal port is used, that is, a port greater than 1024 is used.

You can confirm this error by looking at the log:

[root@local~ /] # cat / var/log/messages | grep mount

Jan 2 12:49:04 localhost mountd [1644]: refused mount request from 192.168.0.100 for / home/nfsshare/ (/ home/nfsshare): illegal port 1689

Solution:

Modify the configuration file / etc/exports, add the insecure option, restart the nfs service, and then try to mount it.

/ home/nfsshare/ * (insecure,rw,async,no_root_squash)

2. NFS version problem

Edit the / etc/sysconfig/nfs file and find the following:

# Turn off v2 and v3 protocol support

# RPCNFSDARGS= "- N2-N3"

# Turn off v4 protocol support

# RPCNFSDARGS= "- N4" / remove the # sign before this sentence /

Finally, save, restart the nfs service, and then try to mount it; if you can't mount it, try adding the-o nolock parameter later.

3. Check whether the directory mounted by the client has read and write permissions, and add the appropriate permissions.

4. The corresponding domain name of the client machine IP is set in the / etc/hosts on the nfs server, and you can delete it.

Through the above methods, the error of access denied by server while mounting should be solved.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report