NFS access denied by server while mounting
Posted: 2012/05/20 13:33:43
I'm trying to munt my server NFS share on my laptob.both are running centos 6.2.the server IP address is 192.168.1.100
and the labtop IP address is 192.168.1.101.when I do :
[code]sudo mount -t nfs 192.168.1.100:/home/ali/nfsshare /home/admin/nfsshare[/code]
I get rhis error:
[code]mount.nfs: access denied by server while mounting 192.168.1.100:/home/ali/nfsshare[/code]
This is my /etc/exports file on the server :
[code]/home/ali/nfsshare 192.168.1.101(rw)[/code]
other information on server :
[code]
[root@localhost ali]# exportfs -v
/home/ali/nfsshare
192.168.1.101(rw,wdelay,root_squash,no_subtree_check)
[root@localhost ali]# cat /etc/sysconfig/selinux
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of these two values:
# targeted - Targeted processes are protected,
# mls - Multi Level Security protection.
SELINUXTYPE=targeted
[root@localhost ali]#
[root@localhost ali]# rpcinfo -p
program vers proto port service
100000 4 tcp 111 portmapper
100000 3 tcp 111 portmapper
100000 2 tcp 111 portmapper
100000 4 udp 111 portmapper
100000 3 udp 111 portmapper
100000 2 udp 111 portmapper
100024 1 udp 36584 status
100024 1 tcp 50261 status
100011 1 udp 875 rquotad
100011 2 udp 875 rquotad
100011 1 tcp 875 rquotad
100011 2 tcp 875 rquotad
100003 2 tcp 2049 nfs
100003 3 tcp 2049 nfs
100003 4 tcp 2049 nfs
100227 2 tcp 2049 nfs_acl
100227 3 tcp 2049 nfs_acl
100003 2 udp 2049 nfs
100003 3 udp 2049 nfs
100003 4 udp 2049 nfs
100227 2 udp 2049 nfs_acl
100227 3 udp 2049 nfs_acl
100021 1 udp 51821 nlockmgr
100021 3 udp 51821 nlockmgr
100021 4 udp 51821 nlockmgr
100021 1 tcp 40053 nlockmgr
100021 3 tcp 40053 nlockmgr
100021 4 tcp 40053 nlockmgr
100005 1 udp 56520 mountd
100005 1 tcp 60047 mountd
100005 2 udp 32988 mountd
100005 2 tcp 54563 mountd
100005 3 udp 36893 mountd
100005 3 tcp 44225 mountd
[root@localhost ali]#
[/code]
other information for client
[code]
[root@centos admin]# mount -t nfs 192.168.1.100:/home/ali/nfsshare /home/admin/nfsshare/
mount.nfs: access denied by server while mounting 192.168.1.100:/home/ali/nfsshare
[root@centos admin]#
[root@centos admin]# mount -t nfs -v 192.168.1.100:/home/ali/nfsshare /home/admin/nfsshare/
mount.nfs: timeout set for Sun May 20 22:38:38 2012
mount.nfs: trying text-based options 'vers=4,addr=192.168.1.100,clientaddr=192.168.1.101'
mount.nfs: mount(2): Permission denied
mount.nfs: access denied by server while mounting 192.168.1.100:/home/ali/nfsshare
[root@centos admin]#
[root@centos admin]# showmount -e 192.168.1.100
Export list for 192.168.1.100:
/home/ali/nfsshare 192.168.1.101
[root@centos admin]#
[root@centos admin]# cat /etc/sysconfig/selinux
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of these two values:
# targeted - Targeted processes are protected,
# mls - Multi Level Security protection.
SELINUXTYPE=targeted
[root@centos admin]# cat /var/log/messages |grep nfs
May 20 17:26:44 centos kernel: Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
May 20 17:26:44 centos kernel: NFSD: Using /var/lib/nfs/v4recovery as the NFSv4 state recovery directory
May 20 19:14:15 centos kernel: FS-Cache: Netfs 'nfs' registered for caching
May 20 19:48:34 centos kernel: nfsd: last server has exited, flushing export cache
May 20 19:48:36 centos kernel: NFSD: Using /var/lib/nfs/v4recovery as the NFSv4 state recovery directory
May 20 20:07:34 centos kernel: nfsd: last server has exited, flushing export cache
May 20 20:07:40 centos kernel: NFSD: Using /var/lib/nfs/v4recovery as the NFSv4 state recovery directory
May 20 21:12:27 centos kernel: nfsd: last server has exited, flushing export cache
May 20 21:12:30 centos kernel: NFSD: Using /var/lib/nfs/v4recovery as the NFSv4 state recovery directory
May 20 21:28:21 centos kernel: nfsd: last server has exited, flushing export cache
May 20 21:28:22 centos kernel: NFSD: Using /var/lib/nfs/v4recovery as the NFSv4 state recovery directory
May 20 21:29:52 centos kernel: nfsd: last server has exited, flushing export cache
May 20 21:31:46 centos kernel: NFSD: Using /var/lib/nfs/v4recovery as the NFSv4 state recovery directory
May 20 21:54:41 centos kernel: nfsd: last server has exited, flushing export cache
May 20 21:55:36 centos kernel: Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
May 20 21:55:36 centos kernel: NFSD: Using /var/lib/nfs/v4recovery as the NFSv4 state recovery directory
May 20 21:57:15 centos kernel: FS-Cache: Netfs 'nfs' registered for caching
[root@centos admin]#
[/code]
and the labtop IP address is 192.168.1.101.when I do :
[code]sudo mount -t nfs 192.168.1.100:/home/ali/nfsshare /home/admin/nfsshare[/code]
I get rhis error:
[code]mount.nfs: access denied by server while mounting 192.168.1.100:/home/ali/nfsshare[/code]
This is my /etc/exports file on the server :
[code]/home/ali/nfsshare 192.168.1.101(rw)[/code]
other information on server :
[code]
[root@localhost ali]# exportfs -v
/home/ali/nfsshare
192.168.1.101(rw,wdelay,root_squash,no_subtree_check)
[root@localhost ali]# cat /etc/sysconfig/selinux
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of these two values:
# targeted - Targeted processes are protected,
# mls - Multi Level Security protection.
SELINUXTYPE=targeted
[root@localhost ali]#
[root@localhost ali]# rpcinfo -p
program vers proto port service
100000 4 tcp 111 portmapper
100000 3 tcp 111 portmapper
100000 2 tcp 111 portmapper
100000 4 udp 111 portmapper
100000 3 udp 111 portmapper
100000 2 udp 111 portmapper
100024 1 udp 36584 status
100024 1 tcp 50261 status
100011 1 udp 875 rquotad
100011 2 udp 875 rquotad
100011 1 tcp 875 rquotad
100011 2 tcp 875 rquotad
100003 2 tcp 2049 nfs
100003 3 tcp 2049 nfs
100003 4 tcp 2049 nfs
100227 2 tcp 2049 nfs_acl
100227 3 tcp 2049 nfs_acl
100003 2 udp 2049 nfs
100003 3 udp 2049 nfs
100003 4 udp 2049 nfs
100227 2 udp 2049 nfs_acl
100227 3 udp 2049 nfs_acl
100021 1 udp 51821 nlockmgr
100021 3 udp 51821 nlockmgr
100021 4 udp 51821 nlockmgr
100021 1 tcp 40053 nlockmgr
100021 3 tcp 40053 nlockmgr
100021 4 tcp 40053 nlockmgr
100005 1 udp 56520 mountd
100005 1 tcp 60047 mountd
100005 2 udp 32988 mountd
100005 2 tcp 54563 mountd
100005 3 udp 36893 mountd
100005 3 tcp 44225 mountd
[root@localhost ali]#
[/code]
other information for client
[code]
[root@centos admin]# mount -t nfs 192.168.1.100:/home/ali/nfsshare /home/admin/nfsshare/
mount.nfs: access denied by server while mounting 192.168.1.100:/home/ali/nfsshare
[root@centos admin]#
[root@centos admin]# mount -t nfs -v 192.168.1.100:/home/ali/nfsshare /home/admin/nfsshare/
mount.nfs: timeout set for Sun May 20 22:38:38 2012
mount.nfs: trying text-based options 'vers=4,addr=192.168.1.100,clientaddr=192.168.1.101'
mount.nfs: mount(2): Permission denied
mount.nfs: access denied by server while mounting 192.168.1.100:/home/ali/nfsshare
[root@centos admin]#
[root@centos admin]# showmount -e 192.168.1.100
Export list for 192.168.1.100:
/home/ali/nfsshare 192.168.1.101
[root@centos admin]#
[root@centos admin]# cat /etc/sysconfig/selinux
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of these two values:
# targeted - Targeted processes are protected,
# mls - Multi Level Security protection.
SELINUXTYPE=targeted
[root@centos admin]# cat /var/log/messages |grep nfs
May 20 17:26:44 centos kernel: Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
May 20 17:26:44 centos kernel: NFSD: Using /var/lib/nfs/v4recovery as the NFSv4 state recovery directory
May 20 19:14:15 centos kernel: FS-Cache: Netfs 'nfs' registered for caching
May 20 19:48:34 centos kernel: nfsd: last server has exited, flushing export cache
May 20 19:48:36 centos kernel: NFSD: Using /var/lib/nfs/v4recovery as the NFSv4 state recovery directory
May 20 20:07:34 centos kernel: nfsd: last server has exited, flushing export cache
May 20 20:07:40 centos kernel: NFSD: Using /var/lib/nfs/v4recovery as the NFSv4 state recovery directory
May 20 21:12:27 centos kernel: nfsd: last server has exited, flushing export cache
May 20 21:12:30 centos kernel: NFSD: Using /var/lib/nfs/v4recovery as the NFSv4 state recovery directory
May 20 21:28:21 centos kernel: nfsd: last server has exited, flushing export cache
May 20 21:28:22 centos kernel: NFSD: Using /var/lib/nfs/v4recovery as the NFSv4 state recovery directory
May 20 21:29:52 centos kernel: nfsd: last server has exited, flushing export cache
May 20 21:31:46 centos kernel: NFSD: Using /var/lib/nfs/v4recovery as the NFSv4 state recovery directory
May 20 21:54:41 centos kernel: nfsd: last server has exited, flushing export cache
May 20 21:55:36 centos kernel: Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
May 20 21:55:36 centos kernel: NFSD: Using /var/lib/nfs/v4recovery as the NFSv4 state recovery directory
May 20 21:57:15 centos kernel: FS-Cache: Netfs 'nfs' registered for caching
[root@centos admin]#
[/code]