mount时发生“permission denied

1.执行Mount命令,出现下面的错误

[root@dzcp-4 /]# mount -all
mount: 192.168.2.93:/u03 failed, reason given by server: Permission  denied


2. 检查portmap和nfs服务是否起来

[root@dzcp-4 /]# chkconfig --list | grep port
portmap        0:off  1:off  2:off  3:on   4:on   5:on   6:off

 

[root@dzcp-4 /]# chkconfig --list|grep nfs
nfs            0:off  1:off  2:off  3:off  4:off  5:off   6:off
nfslock        0:off  1:off  2:off  3:on   4:on   5:on   6:off

 

发现是nfs没有启动,启动NFS服务

[root@dzcp-4 /]# chkconfig --level 3 nfs on


[root@dzcp-4 /]# service nfs start
Starting NFSservices:                                    [  OK  ]
Starting NFSquotas:                                      [  OK  ]
Starting NFSdaemon:                                      [  OK  ]
Starting NFSmountd:                                      [  OK  ]

3. 执行mount命令,还是报”permission denied" 错误

[root@dzcp-4 /]# mount -all
mount: 192.168.2.93:/u03 failed, reason given by server: Permissiondenied

 

4. 检查服务器端是否export出相关目录

[root@dzcp-4 /]# showmount -e 192.168.2.93
Export list for 192.168.2.93:
/u03 192.168.4.110

5.查看服务器端日志/var/log/message,找到下面的错误

Jul  8 16:30:03 localhost mountd[28755]: mountrequest from unknown host 192.168.4.111 for /u03 (/u03)
Jul  8 16:51:07 localhost mountd[28755]: mountrequest from unknown host 192.168.4.111 for /u03 (/u03)

6. 在服务器端执行下面命令,强制重新读取/etc/exports文件,

[root@localhost log]# exportfs -ra
[root@localhost log]# exportfs
/u03           192.168.4.110
/u03           192.168.4.111
[root@localhost log]#

7.回到客户端重新执行mount命令,问题就解决了

[root@dzcp-4 /]# mount -all
[root@dzcp-4 /]#

 

 


 

你可能感兴趣的:(linux,Linux,mount,nfs)