NFS access denied by server while mounting
NFS access denied by server while mounting
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]
NFS access denied by server while mounting
Looks like iptables needs some love ?
Re: NFS access denied by server while mounting
[quote]Looks like iptables needs some love ?[/quote]
Who? can you Explain me?
What can I do?
[code]
[root@centos admin]# mount -v -o 'vers=3' 192.168.1.100:/home/ali/nfs1 /nfs1/
mount: no type was given - I'll assume nfs because of the colon
mount.nfs: timeout set for Mon May 21 01:45:47 2012
mount.nfs: trying text-based options 'vers=3,addr=192.168.1.100'
mount.nfs: prog 100003, trying vers=3, prot=6
mount.nfs: trying 192.168.1.100 prog 100003 vers 3 prot TCP port 2049
mount.nfs: prog 100005, trying vers=3, prot=17
mount.nfs: trying 192.168.1.100 prog 100005 vers 3 prot UDP port 892
192.168.1.100:/home/ali/nfs1 on /nfs1 type nfs (rw,vers=3)
[root@centos admin]#
[/code]
Who? can you Explain me?
What can I do?
[code]
[root@centos admin]# mount -v -o 'vers=3' 192.168.1.100:/home/ali/nfs1 /nfs1/
mount: no type was given - I'll assume nfs because of the colon
mount.nfs: timeout set for Mon May 21 01:45:47 2012
mount.nfs: trying text-based options 'vers=3,addr=192.168.1.100'
mount.nfs: prog 100003, trying vers=3, prot=6
mount.nfs: trying 192.168.1.100 prog 100003 vers 3 prot TCP port 2049
mount.nfs: prog 100005, trying vers=3, prot=17
mount.nfs: trying 192.168.1.100 prog 100005 vers 3 prot UDP port 892
192.168.1.100:/home/ali/nfs1 on /nfs1 type nfs (rw,vers=3)
[root@centos admin]#
[/code]
Re: NFS access denied by server while mounting
It's done!!!worked :-?
of course. by this way :
[code]
[root@centos admin]# mount -t nfs -o vers=3,rw,hard,bg,intr 192.168.1.100:/home/ali/nfs1 /nfs1/
[/code]
I have important question ,
what do it do this command ?
vers=3,rw,hard,bg,intr ?????
can you Explain me?
of course. by this way :
[code]
[root@centos admin]# mount -t nfs -o vers=3,rw,hard,bg,intr 192.168.1.100:/home/ali/nfs1 /nfs1/
[/code]
I have important question ,
what do it do this command ?
vers=3,rw,hard,bg,intr ?????
can you Explain me?
-
- Retired Moderator
- Posts: 18276
- Joined: 2006/12/13 20:15:34
- Location: Tidewater, Virginia, North America
- Contact:
Re: NFS access denied by server while mounting
Not really. Why use NFSv3 between two CentOS-6 systems? Does the following work?[code]mount -t nfs4 192.168.1.100:/home/ali/nfs1 /nfs1[/code]
Re: NFS access denied by server while mounting
[code]
[root@centos admin]# mount -t nfs4 192.168.1.100:/home/ali/nfs1 /nfs1/
mount.nfs4: access denied by server while mounting 192.168.1.100:/home/ali/nfs1
[root@centos admin]# showmount -e 192.168.1.100
Export list for 192.168.1.100:
/home/ali/nfs1 192.168.1.0/24
/home/ali/Packages 192.168.1.0/24
[root@centos admin]# mount -t nfs4 192.168.1.100:/home/ali/nfs1 /nfs1/
[/code]
What's the version I use??
[root@centos admin]# mount -t nfs4 192.168.1.100:/home/ali/nfs1 /nfs1/
mount.nfs4: access denied by server while mounting 192.168.1.100:/home/ali/nfs1
[root@centos admin]# showmount -e 192.168.1.100
Export list for 192.168.1.100:
/home/ali/nfs1 192.168.1.0/24
/home/ali/Packages 192.168.1.0/24
[root@centos admin]# mount -t nfs4 192.168.1.100:/home/ali/nfs1 /nfs1/
[/code]
What's the version I use??
-
- Retired Moderator
- Posts: 18276
- Joined: 2006/12/13 20:15:34
- Location: Tidewater, Virginia, North America
- Contact:
Re: NFS access denied by server while mounting
NFSv4 uses different ports. Does it work if you temporarily stop iptables on the server? If that works try opening port 2049 for TCP, or just check the [b]NFS4[/b] box in[b] system-config-firewall[/b].
Re: NFS access denied by server while mounting
It doesn't work.
I do desible Firewall and stop iptable yet It doesn't work :-?
What's your idea?
How I can Run NFSv4 Server without this error?
I run again:
but apear this usual error :
[code][root@centos admin]# mount -t nfs4 192.168.1.100:/home/ali/nfs1 /nfs1/
mount.nfs4: access denied by server while mounting 192.168.1.100:/home/ali/nfs1[/code]
Exports:
[code]
/home/ali/Packages 192.168.1.0/24(rw,no_root_squash)
/home/ali/nfs1 192.168.1.0/24(rw,no_root_squash)
[/code]
I do desible Firewall and stop iptable yet It doesn't work :-?
What's your idea?
How I can Run NFSv4 Server without this error?
I run again:
but apear this usual error :
[code][root@centos admin]# mount -t nfs4 192.168.1.100:/home/ali/nfs1 /nfs1/
mount.nfs4: access denied by server while mounting 192.168.1.100:/home/ali/nfs1[/code]
Exports:
[code]
/home/ali/Packages 192.168.1.0/24(rw,no_root_squash)
/home/ali/nfs1 192.168.1.0/24(rw,no_root_squash)
[/code]
-
- Retired Moderator
- Posts: 18276
- Joined: 2006/12/13 20:15:34
- Location: Tidewater, Virginia, North America
- Contact:
Re: NFS access denied by server while mounting
What do you mean "I do desible [sic] Firewall and stop iptable [sic]"? The interface to the kernel netfilter firewall [b][i]is[/i][/b] iptables.
Are you [i]sure[/i] you are disabling/stopping iptables and defining the exports on the [b]server[/b] and not the client? Have you done "exportfs -r" or rebooted the server after making the changes to /etc/exports?
Are you [i]sure[/i] you are disabling/stopping iptables and defining the exports on the [b]server[/b] and not the client? Have you done "exportfs -r" or rebooted the server after making the changes to /etc/exports?
Re: NFS access denied by server while mounting
[quote]Have you done "exportfs -r" or rebooted the server after making the changes to /etc/exports?[/quote]
yes I do.I disable firewall .
[code]
[root@localhost ali]# exportfs -r
[root@localhost ali]# exportfs -v
/home/ali/Packages
192.168.1.0/24(rw,wdelay,no_root_squash,no_subtree_check)
/home/ali/nfs1 192.168.1.0/24(rw,wdelay,no_root_squash,no_subtree_check)
[root@localhost ali]#
[/code]
My mind does not work :-? :-(
So why run is this way:
[code]
[root@centos admin]# mount -t nfs -o vers=3,rw,hard,bg,intr 192.168.1.100:/home/ali/nfs1 /nfs1/
[/code]
yes I do.I disable firewall .
[code]
[root@localhost ali]# exportfs -r
[root@localhost ali]# exportfs -v
/home/ali/Packages
192.168.1.0/24(rw,wdelay,no_root_squash,no_subtree_check)
/home/ali/nfs1 192.168.1.0/24(rw,wdelay,no_root_squash,no_subtree_check)
[root@localhost ali]#
[/code]
My mind does not work :-? :-(
So why run is this way:
[code]
[root@centos admin]# mount -t nfs -o vers=3,rw,hard,bg,intr 192.168.1.100:/home/ali/nfs1 /nfs1/
[/code]