LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   NFS Issue? (https://www.linuxquestions.org/questions/linux-newbie-8/nfs-issue-725167/)

your_shadow03 05-11-2009 06:32 AM

NFS Issue?
 
I have two RHEL Machines rh1 and rh2.I tried to creat rh1 as NFS Server and edited /etc/exports as:
Code:

/home/fdmin/arch                          *(rw,sync,no_root_squash)
And exports -a worked without any error.
Restarted nfs
Showmount -e localhost showing good.

I tried running this on rh2
It says:
Code:

# mount -t nfs rh1:/home/fdmin/arch /tmp/res
mount: rhn1:/home/fdmin/arc/ failed, reason given by server: Permission denied
#

Showmount -e rh1 worked and shows fine on rh2 but rh2 is not able to mount rh1.

Also, If I try making rh2 as server and rh1 as client it works fine.
Why does the first setup doesnt work?

dxangel 05-11-2009 07:21 AM

what do your logs say?

your_shadow03 05-11-2009 01:01 PM

Which logs?are you talking about /var/log/messages?
It doesnt show any error?

Tinkster 05-11-2009 03:51 PM

On neither machine? How odd.


Cheers,
Tink

custangro 05-11-2009 04:09 PM

Quote:

Originally Posted by your_shadow03 (Post 3536913)
I have two RHEL Machines rh1 and rh2.I tried to creat rh1 as NFS Server and edited /etc/exports as:
Code:

/home/fdmin/arch                          *(rw,sync,no_root_squash)
And exports -a worked without any error.
Restarted nfs
Showmount -e localhost showing good.

I tried running this on rh2
It says:
Code:

# mount -t nfs rh1:/home/fdmin/arch /tmp/res
mount: rhn1:/home/fdmin/arc/ failed, reason given by server: Permission denied
#

Showmount -e rh1 worked and shows fine on rh2 but rh2 is not able to mount rh1.

Also, If I try making rh2 as server and rh1 as client it works fine.
Why does the first setup doesnt work?

Is the firewall/selinux enabled on either host? Are you using tcp_wrppers? Is there any other firewall in the picture (cisco or any other hardware firewall)?

-C

jim80net 05-11-2009 07:33 PM

I'd take a look at your permissions for the exported directory. Try bringing it all the way forward (777) then scaling back.

your_shadow03 05-12-2009 11:40 AM

Its 777 what chmod says.
se-Linux is disabled too.

custangro 05-12-2009 11:49 AM

Quote:

Originally Posted by your_shadow03 (Post 3538413)
Its 777 what chmod says.
se-Linux is disabled too.

What about the firewall? Any firewalls involved?

-C

your_shadow03 05-12-2009 10:37 PM

Code:

#service iptables stop
shows no output

chrism01 05-12-2009 11:26 PM

That's normal for *nix. If you issue a basic cmd and it works, there's normally no output.
what we need is

iptables -L

on both systems when iptables is up. Mind you if it doesn't work after you've stopped iptables on BOTH systems, then its not an iptables issue.
Have checked tcp_wrappers (hosts.allow, hosts.deny) in /etc ?

your_shadow03 05-13-2009 03:09 AM

/etc/hosts.allow and /etc/hosts.deny seems to be completely hashed.

your_shadow03 05-13-2009 03:11 AM

[root@131e ~]# iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination

Chain FORWARD (policy ACCEPT)
target prot opt source destination

Chain OUTPUT (policy ACCEPT)
target prot opt source destination
[root@131e ~]#

your_shadow03 05-13-2009 03:13 AM

May 13 08:14:13 131e rpc.mountd: refused mount request from rh1 for /tmp/resd (/): not exported

custangro 05-13-2009 10:06 AM

Quote:

Originally Posted by your_shadow03 (Post 3539096)
May 13 08:14:13 131e rpc.mountd: refused mount request from rh1 for /tmp/resd (/): not exported

Question...

Are you using /etc/hosts.allow /etc/hosts.deny?

-C

chrism01 05-13-2009 07:54 PM

Use
service iptables stop
on BOTH systems and try again. If it doesn't work, show us hosts.allow, hosts.deny from BOTH systems. Saying they are 'hashed' is meaningless!
(They are plain text files)


All times are GMT -5. The time now is 02:36 AM.