LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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 06-23-2008, 10:22 AM   #1
freeindy
Member
 
Registered: Nov 2002
Posts: 207

Rep: Reputation: 32
Nfs mount fails: permission denied


Hi,

I have the following configuration:

Machine1: Server (Redhat EL 4) | ip:192.168.0.254
Machine2: Client1 (RedHat based linux) | ip:192.168.0.6
Machine3: Client2 (Redhat based linux) | ip:192.168.0.9

Both clients file system is nfs mounted
Code:
/tftpboot/images *(rw,sync,no_root_squash,no_all_squash)
from the Server. Both clients run without any problems.

Now I want the clients to be able to mount a directory on each others file system. Both have the following line in the /etc/exports:

Code:
/usr/local/remote *(rw,root_squash,sync)
nfs server are running on both clients:
Code:
# /usr/sbin/rpcinfo -p
   program vers proto   port
    100000    2   tcp    111  portmapper
    100000    2   udp    111  portmapper
    100024    1   udp    942  status
    100024    1   tcp    945  status
    100003    2   udp   2049  nfs
    100003    2   tcp   2049  nfs
    100021    1   udp  32772  nlockmgr
    100021    3   udp  32772  nlockmgr
    100021    4   udp  32772  nlockmgr
    100021    1   tcp  32769  nlockmgr
    100021    3   tcp  32769  nlockmgr
    100021    4   tcp  32769  nlockmgr
    100005    1   udp    858  mountd
    100005    1   tcp    861  mountd
    100005    2   udp    858  mountd
    100005    2   tcp    861  mountd
    100005    3   udp    858  mountd
    100005    3   tcp    861  mountd
And when I try to mount the directory manually, I get:

Code:
#mount 192.168.0.6:/usr/local/remote test
mount: 192.168.0.6:/usr/local/element/rel/ failed, reason given by server: Permission denied
Where can I trace the problem? Any clue how to solve this?

thanks,

Indy
 
Old 06-23-2008, 10:44 AM   #2
DotHQ
Member
 
Registered: Mar 2006
Location: Ohio, USA
Distribution: Red Hat, Fedora, Knoppix,
Posts: 548

Rep: Reputation: 33
tail your /var/log/messages file.
It should give you a hint where the issue is.
 
Old 06-23-2008, 10:50 AM   #3
freeindy
Member
 
Registered: Nov 2002
Posts: 207

Original Poster
Rep: Reputation: 32
tried that,

Nothing is been printed relating to that.

Indy
 
Old 06-23-2008, 11:21 AM   #4
tungvs
Member
 
Registered: May 2008
Distribution: Centos; Ubuntu; Fedora
Posts: 98

Rep: Reputation: 15
Maybe the problem is "root_squash". Have you tried with normal user or root user on the client ?
 
Old 06-23-2008, 12:05 PM   #5
DotHQ
Member
 
Registered: Mar 2006
Location: Ohio, USA
Distribution: Red Hat, Fedora, Knoppix,
Posts: 548

Rep: Reputation: 33
I agree, you might try leaving the root_squash stuff out all together just to see ifit mounts. ie:
(rw,sync)

If that doesn't help turn off IPtables on both servers long enough to see if that helps the situation.
service iptables stop
 
Old 06-24-2008, 04:01 AM   #6
freeindy
Member
 
Registered: Nov 2002
Posts: 207

Original Poster
Rep: Reputation: 32
No luck.

I changed the settings in /etc/exports to *(rw,sync) on all machines. Reloaded the exportfs on server and booted the clients. One problem I ran into was I couldn't log in to clients via server any more. Nor with ssh. So I had to put back the original setting on server : *(rw,sync,no_root_squash,no_all_squash).
A also tuned iptables on all machines off but still same problem occurs. One thing i find it very strange is that I don't get any logs in /var/log/messages or /var/log/syslog.

Indy
 
Old 06-24-2008, 09:03 AM   #7
tungvs
Member
 
Registered: May 2008
Distribution: Centos; Ubuntu; Fedora
Posts: 98

Rep: Reputation: 15
I've tried RHEL 4 before and sometimes the NFS daemon's really weird. Once, I added "/something 192.168.1.33(...)" but the NFS didn't work, but it worked on "/something 192.168.1.*(...)". The problem's solved when I restart my server, both sharing methods are OK. I think it's a bug in the software. Yours could be, too.
 
Old 06-24-2008, 09:45 AM   #8
DotHQ
Member
 
Registered: Mar 2006
Location: Ohio, USA
Distribution: Red Hat, Fedora, Knoppix,
Posts: 548

Rep: Reputation: 33
ssh should not be affected by your exports file changes.

If you are using /etc/hosts.allow & /etc/hosts.deny you should turn those off as well as iptables while testing NFS (just to be sure they are not stopping you).
No messages in /var/log/messages tells me you are not getting into the server at all. You are being turned away before any connection is made.
 
Old 06-24-2008, 10:14 AM   #9
freeindy
Member
 
Registered: Nov 2002
Posts: 207

Original Poster
Rep: Reputation: 32
How do I turn off hosts.allow & hosts.deny?

I added ALL:ALL to hosts.allow without any affect.

Last edited by freeindy; 06-24-2008 at 10:17 AM.
 
  


Reply



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
NFS mount of smb mount of windows share: permission denied problem :( Bagatur Linux - Networking 4 07-07-2009 11:34 AM
NFS mount permission denied sidra Linux - Networking 10 03-03-2008 03:47 PM
NFS mount permission denied! naesyllek Linux - Networking 25 06-06-2007 04:24 AM
nfs mount: permission denied kpachopoulos Linux - General 13 02-12-2007 12:07 PM
NFS mount fails reson: permission denied erpe Linux - Networking 1 10-21-2006 12:26 PM

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

All times are GMT -5. The time now is 02:47 PM.

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