Quantcast
Channel: linuxadmin: Expanding Linux SysAdmin knowledge
Viewing all articles
Browse latest Browse all 17773

"mount.nfs access denied by server"

$
0
0

Here are the steps I've taken so far:

server01 # apt-get install nfs-kernel-server server01 # mkdir /home/acoder/Public server01 # vi /etc/fstab # added the following line /home/acoder/Public /export/public none bind 0 0 server01 # ifconfig eth0 Link encap:Ethernet HWaddr d0:67:e5:3f:fa:82 inet addr:1.2.3.4 Bcast:10.200.1.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:53009 errors:0 dropped:0 overruns:0 frame:0 TX packets:32395 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:39888803 (39.8 MB) TX bytes:4382214 (4.3 MB) Interrupt:20 Memory:e3900000-e3920000 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:23485 errors:0 dropped:0 overruns:0 frame:0 TX packets:23485 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:2612596 (2.6 MB) TX bytes:2612596 (2.6 MB) server01 # vi /etc/exportsPS: no helpful information in /var/log/syslog on either server or client (both are Linux Mint 17 systems). # added the following lines /export 192.168.1.0/24(rw,fsid=0,insecure,no_subtree_check,async,no_root_squash) /export/public 192.168.1.0/24(rw,nohide,insecure,no_subtree_check,async,no_root_squash) server01 # mkdir -p /export/public server01 # chmod 777 /export/ server01 # chmod 777 /export/public/ server01 # exportfs -a server01 # service nfs-kernel-server restart server01 # showmount -e Export list for server01: /export/public 192.168.1.0/24 /export 192.168.1.0/24 

Now to the client:

client01 # mkdir /mnt/server01public client01 # mount -t nfs -o proto=tcp,port=2049 1.2.3.4:/public/ /mnt/server01public/ mount.nfs: access denied by server while mounting 1.2.3.4:/public/ 

I've turned the server firewall off (it's in my local home network), and I still get the same error.

What am I missing?

SOLUTION

Edited /etc/exports and added the specific IP of the client machine:

 # added the following lines /export 1.2.3.0/24(rw,fsid=0,insecure,no_subtree_check,async,no_root_squash) /export/public 1.2.3.0/24(rw,nohide,insecure,no_subtree_check,async,no_root_squash) 

Issued exportfs -a, and was able to mount from the client.

submitted by acoder2010
[link][9 comments]

Viewing all articles
Browse latest Browse all 17773

Trending Articles