Linux - Server This forum is for the discussion of Linux Software used in a server related context. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
|
01-01-2011, 09:27 AM
|
#1
|
LQ Newbie
Registered: Jan 2011
Posts: 13
Rep:
|
NFS
Hello,
I'm running an NFS Server on my Fedora machine and trying to mount it on my OpenSuse netbook.Right now I'm getting a "permission denied error" when I try to mount NFS on my netbook. (Yesterday I could mount, but could only read not write... strange)
my Servers IP is 192.168.1.45
my Netbooks IP is 192.168.1.42
/etc/export on Server
Code:
/home/bob/Music 192.168.1.42(rw,no_root_squash)
/etc/hosts.allow on Server
Code:
sshd: 192.168.1.0/255.255.255.0
nfsd: ALL
portmap: ALL
mountd: ALL
/etc/hosts.deny on Server is empty
mount command on my netbook
Code:
mount -v 192.168.1.45:/home/bob/Music /home/bob/nfs
mount: no type was given - I'll assume nfs because of the colon
mount.nfs: timeout set for Sat Jan 1 16:16:34 2011
mount.nfs: trying text-based options 'nfsvers=4,addr=192.168.1.45,clientaddr=192.168.1.42'
mount.nfs: mount(2): Permission denied
mount.nfs: access denied by server while mounting 192.168.1.45:/home/bob/Music
Thanks for your help
|
|
|
01-01-2011, 10:06 AM
|
#2
|
Senior Member
Registered: Oct 2009
Location: Wroclaw, Poland
Distribution: Arch, Kubuntu
Posts: 1,281
|
Which version of nfs are you running? For v4 you must specify "-t nfs4" in mount command. Are you running firewall on the client or server? For the test is better to disable hosts.allow by renaming this file. Check also on the client machine:
Code:
rpcinfo -p 192.168.1.45
Last edited by eSelix; 01-01-2011 at 10:09 AM.
|
|
|
01-01-2011, 10:27 AM
|
#3
|
LQ Newbie
Registered: Jan 2011
Posts: 13
Original Poster
Rep:
|
I am running version 4, specifying the format with -t nfs4 did not help.
The firewall does have an exception for nfs, (after all it did work a bit this morning).
On my Netbook
Code:
/home/bob # rpcinfo -p 192.168.1.45
rpcinfo: can't contact portmapper: RPC: Remote system error - No route to host
/home/bob # rpcinfo -p 192.168.1.42
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
On my Server:
Code:
[root@server bob]# rpcinfo -p 192.168.1.45
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 56808 status
100024 1 tcp 52766 status
100021 1 udp 57945 nlockmgr
100021 3 udp 57945 nlockmgr
100021 4 udp 57945 nlockmgr
100021 1 tcp 37682 nlockmgr
100021 3 tcp 37682 nlockmgr
100021 4 tcp 37682 nlockmgr
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
100005 1 udp 44029 mountd
100005 1 tcp 42055 mountd
100005 2 udp 37126 mountd
100005 2 tcp 44285 mountd
100005 3 udp 33530 mountd
100005 3 tcp 36680 mountd
[root@server bob]# rpcinfo -p 192.168.1.42
(kinda hung up)
|
|
|
01-01-2011, 11:09 AM
|
#4
|
Member
Registered: Apr 2007
Distribution: centos,rhel, solaris
Posts: 239
Rep:
|
Code:
/home/bob # rpcinfo -p 192.168.1.45
rpcinfo: can't contact portmapper: RPC: Remote system error - No route to host
Can you check connectivity between your netbook and your fedora server? like can you ping the server?
|
|
|
01-01-2011, 11:17 AM
|
#5
|
Senior Member
Registered: Oct 2009
Location: Wroclaw, Poland
Distribution: Arch, Kubuntu
Posts: 1,281
|
Also check
Code:
route -n
iptables -S
on both server and client. They are physically connected through switch or router? If router check these command also on it.
|
|
|
01-01-2011, 02:39 PM
|
#6
|
Member
Registered: Jun 2007
Distribution: Debian, SLES, Ubuntu
Posts: 308
Rep:
|
You are getting a permissions denied. Make sure that the uids match on both ends.
|
|
|
01-01-2011, 05:05 PM
|
#7
|
LQ Newbie
Registered: Jan 2011
Posts: 13
Original Poster
Rep:
|
I can configure my Server with SSH form my netbook so the connection is fine 
What do you mean with user id? How I have to make them match?
|
|
|
01-01-2011, 05:52 PM
|
#8
|
Member
Registered: Jun 2007
Distribution: Debian, SLES, Ubuntu
Posts: 308
Rep:
|
NFS works properly with the uids matching on both machines.
id <username>
There should be a uid entry. Make sure that they match on the systems that you are using NFS to and from.
|
|
|
01-01-2011, 06:02 PM
|
#9
|
Member
Registered: Jan 2008
Distribution: RHEL, CentOS, Ubuntu
Posts: 379
Rep:
|
Make sure you nfs client services are running. Did you use Yast2 to set up client?
|
|
|
01-01-2011, 07:53 PM
|
#10
|
Senior Member
Registered: Oct 2009
Location: Wroclaw, Poland
Distribution: Arch, Kubuntu
Posts: 1,281
|
Before checking uids and permissions, first you must get proper response on client machine for
Code:
rpcinfo -p 192.168.1.45
Now you get "no route to host", portmapper can't even connect to your server to establish nfs connection. This very likely means that your firewall block it, did you enabled port 111 and 2049 on server and client?
Check also on the client: For me I must enabled idmap for nfs working.
Last edited by eSelix; 01-01-2011 at 08:10 PM.
|
|
|
01-01-2011, 08:44 PM
|
#11
|
Member
Registered: Jan 2008
Distribution: RHEL, CentOS, Ubuntu
Posts: 379
Rep:
|
also, on the client
Code:
showmount -e 192.168.1.45
|
|
|
01-02-2011, 09:42 AM
|
#12
|
LQ Newbie
Registered: Jan 2011
Posts: 13
Original Poster
Rep:
|
Okay UIDs dont match. Port 111 was blocked by the firewall, but 2049 was not.
How do I have to set up my NFS Client?
|
|
|
01-02-2011, 09:58 AM
|
#13
|
Senior Member
Registered: Oct 2009
Location: Wroclaw, Poland
Distribution: Arch, Kubuntu
Posts: 1,281
|
Please post the output of commands from post #10 and #11.
Last edited by eSelix; 01-02-2011 at 09:59 AM.
|
|
|
01-02-2011, 10:03 AM
|
#14
|
LQ Newbie
Registered: Jan 2011
Posts: 13
Original Poster
Rep:
|
Code:
/home/bob # rpcinfo -p 192.168.1.45 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 35202 status
100024 1 tcp 40415 status
100021 1 udp 52340 nlockmgr
100021 3 udp 52340 nlockmgr
100021 4 udp 52340 nlockmgr
100021 1 tcp 34639 nlockmgr
100021 3 tcp 34639 nlockmgr
100021 4 tcp 34639 nlockmgr
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
100005 1 udp 42489 mountd
100005 1 tcp 59454 mountd
100005 2 udp 53808 mountd
100005 2 tcp 58140 mountd
100005 3 udp 53557 mountd
100005 3 tcp 59449 mountd
Code:
/home/bob # ps -A | grep rpc
1754 ? 00:00:00 rpcbind
8165 ? 00:00:00 rpciod/0
19474 ? 00:00:00 rpciod/1
Code:
showmount -e 192.168.1.45
clnt_create: RPC: Port mapper failure - Unable to receive: errno 113 (No route to host)
|
|
|
All times are GMT -5. The time now is 08:00 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|