LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 08-23-2015, 05:38 PM   #1
S0phist
LQ Newbie
 
Registered: Aug 2015
Posts: 7

Rep: Reputation: Disabled
mount.nfs: access denied by server while mounting


Hi people,

I have the following problem. When I set /etc/exports up as
Code:
[root@serveur network-scripts]# cat /etc/exports
/home/localserveur client(rw)
I get this message
Code:
mount.nfs: timeout set for Sun Aug 23 18:04:23 2015
mount.nfs: trying text-based options 'vers=4,addr=192.168.1.2,clientaddr=192.168.1.103'
mount.nfs: mount(2): Permission denied
mount.nfs: access denied by server while mounting serveur:/home/localserveur
executing
Code:
mount -t nfs -v serveur:/home/localserveur /home/localserveur
But when I change client's name to its IP/Mask in /etc/exports all is going nice.

Could you explain me why, please.

Thank you.

P.S.

1. The NFS server "serveur" has the folowing settings:

Code:
[root@serveur network-scripts]# ifconfig
eth0      Link encap:Ethernet  HWaddr 08:00:27:9E:4F:65
          inet addr:192.168.1.102  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::a00:27ff:fe9e:4f65/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:7506 errors:0 dropped:0 overruns:0 frame:0
          TX packets:4508 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:679886 (663.9 KiB)  TX bytes:565397 (552.1 KiB)

eth1      Link encap:Ethernet  HWaddr 08:00:27:F4:83:07
          inet addr:192.168.1.2  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::a00:27ff:fef4:8307/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:12 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 b)  TX bytes:816 (816.0 b)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:3176 errors:0 dropped:0 overruns:0 frame:0
          TX packets:3176 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:200176 (195.4 KiB)  TX bytes:200176 (195.4 KiB)
Code:
[root@serveur network-scripts]# cat ifcfg-eth0
DEVICE=eth0
HWADDR=08:00:27:9E:4F:65
TYPE=Ethernet
UUID=611c5680-f3bc-4fb2-9bea-d783046fc59d
ONBOOT=yes
NM_CONTROLLED=yes
BOOTPROTO=dhcp
[root@serveur network-scripts]#
[root@serveur network-scripts]# cat ifcfg-eth1
DEVICE=eth1
HWADDR=08:00:27:F4:83:07
TYPE=Ethernet
UUID=a07e2911-3a87-4945-86ad-f2213c271dbd
ONBOOT=yes
NM_CONTROLLED=yes
BOOTPROTO=static
IPADDR=192.168.1.2
NETMASK=255.255.255.0
Code:
[root@serveur localserveur]# cat /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
192.168.1.2 serveur
192.168.1.3 client
192.168.1.4 slave
2. The client "client" has the folowing settings:

Code:
[root@client ~]# ifconfig
eth0      Link encap:Ethernet  HWaddr 08:00:27:2E:76:C5
          inet addr:192.168.1.103  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::a00:27ff:fe2e:76c5/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:3384 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2264 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:296503 (289.5 KiB)  TX bytes:278809 (272.2 KiB)

eth1      Link encap:Ethernet  HWaddr 08:00:27:07:D2:E0
          inet addr:192.168.1.3  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::a00:27ff:fe07:d2e0/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:11 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 b)  TX bytes:746 (746.0 b)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:700 errors:0 dropped:0 overruns:0 frame:0
          TX packets:700 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:39064 (38.1 KiB)  TX bytes:39064 (38.1 KiB)
Code:
[root@client network-scripts]# cat ifcfg-eth0
DEVICE=eth0
HWADDR=08:00:27:2E:76:C5
TYPE=Ethernet
UUID=d0932a9a-8f67-4ea7-922f-155472241d31
ONBOOT=yes
NM_CONTROLLED=yes
BOOTPROTO=dhcp
[root@client network-scripts]#
[root@client network-scripts]# cat ifcfg-eth1
DEVICE=eth1
HWADDR=08:00:27:07:D2:E0
TYPE=Ethernet
UUID=0db484e2-f311-4916-8788-a934e50ada87
ONBOOT=yes
NM_CONTROLLED=yes
BOOTPROTO=static
IPADDR=192.168.1.3
NETMASK=255.255.255.0
Code:
[root@client network-scripts]# cat /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
192.168.1.2 serveur
192.168.1.3 client
192.168.1.4 slave
[root@client network-scripts]#
 
Old 08-23-2015, 06:42 PM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,675

Rep: Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892
Why are you using both interfaces?

Quote:
mount.nfs: trying text-based options 'vers=4,addr=192.168.1.2,clientaddr=192.168.1.103'
Your hosts file lists 192.168.1.3 but looks like nfs is communicating over eth0 i.e 192.168.1.103. What IP address are you using for the exports file?
 
Old 08-23-2015, 07:25 PM   #3
S0phist
LQ Newbie
 
Registered: Aug 2015
Posts: 7

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by michaelk View Post
Why are you using both interfaces?
Your hosts file lists 192.168.1.3 but looks like nfs is communicating over eth0 i.e 192.168.1.103. What IP address are you using for the exports file?
I'm using Virtual Box. The eth0 interfaces both server and client are Bridge interfaces to communicate with Inet and I'm using them to connect to a PUTTY terminal over ssh as well.

In case when mount is going smoothly I take 192.168.1.3/24 eth1 interface which is set up as Internal net. The same IP is related to the client in /etc/hosts.
 
Old 08-23-2015, 08:24 PM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,675

Rep: Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892
You should change eth1 on your VMs to a different subnet i.e 192.168.2.0/24. Be sure to change your hosts file too. Are your eth1s also configured as a bridged adapter? Internal networking mode allows VMs to network to each other.

Last edited by michaelk; 08-23-2015 at 08:30 PM.
 
1 members found this post helpful.
Old 08-25-2015, 12:00 AM   #5
S0phist
LQ Newbie
 
Registered: Aug 2015
Posts: 7

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by michaelk View Post
You should change eth1 on your VMs to a different subnet i.e 192.168.2.0/24. Be sure to change your hosts file too. Are your eth1s also configured as a bridged adapter? Internal networking mode allows VMs to network to each other.
Thank you. Your solution did the work.
When I began the thread eth1s were in "Internal net" mode. When I applied your solution VMs stoped ping each other over 192.168.2.0/24. So I changed eth1s' mode to "Bridge". That helped.

SOLVED
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
mount.nfs: access denied by server while mounting blackychan Linux - Newbie 4 11-26-2012 03:54 PM
mount.nfs access denied by server while mounting varmanravi20 Red Hat 2 08-02-2012 10:27 AM
[SOLVED] mount.nfs: access denied by server while mounting physnastr Linux - General 2 10-02-2011 03:33 PM
NFS mount mount.nfs: access denied by server while mounting knockout_artist Linux - Newbie 2 11-26-2008 02:36 PM
mount.nfs: access denied by server while mounting mokrunka Linux - Networking 4 10-07-2008 12:53 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 01:42 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration