LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices


Reply
  Search this Thread
Old 10-19-2010, 08:21 AM   #1
zer0signal
Member
 
Registered: Oct 2010
Location: Cleveland
Distribution: Slackware, Fedora, RHEL (4,5), LFS 6.7, CentOS
Posts: 258

Rep: Reputation: 29
CentOS - NFS - Access Denied


Hello all, I have searched for an answer for this, and I have tried everything that I can think of to get NFS to work;

when client goes to bind to NFS share on remote server - they are getting access denied when using the mount command;

[SERVER] - CentOS 5.3

/etc/exports
/mnt/data 192.168.5.199(rw) - implying the client I want to have access

service iptables stop

hosts.allow and deny are empty

service NFS restart

[Client] - Fedora 13

mount 192.168.5.1:/mnt/data /mnt/vmdata
Access denied by host

FYI - I have had this working when my server/router was a Fedora 12 box; Seems to be something specific realated to RHEL "CentOS"

I'm at the point of just putting Fedora back on, but I would really like to resolve this issue, instead of running from it!



Thanks Peeps!
 
Old 10-19-2010, 08:24 AM   #2
Sayan Acharjee
Member
 
Registered: Feb 2010
Location: Chennai, India
Distribution: Manjaro
Posts: 624

Rep: Reputation: 64
Quote:
Originally Posted by zer0signal View Post
Hello all, I have searched for an answer for this, and I have tried everything that I can think of to get NFS to work;

when client goes to bind to NFS share on remote server - they are getting access denied when using the mount command;

[SERVER] - CentOS 5.3

/etc/exports
/mnt/data 192.168.5.199(rw) - implying the client I want to have access

service iptables stop

hosts.allow and deny are empty

service NFS restart

[Client] - Fedora 13

mount 192.168.5.1:/mnt/data /mnt/vmdata
Access denied by host

FYI - I have had this working when my server/router was a Fedora 12 box; Seems to be something specific realated to RHEL "CentOS"

I'm at the point of just putting Fedora back on, but I would really like to resolve this issue, instead of running from it!



Thanks Peeps!
Why you are not using subnet mask when declaring the ip in exports file?

Quote:
/mnt/data 192.168.5.199/subnet_mask (rw)
And also what is the output of the following command? (run it from the client)

Quote:
#showmout -e 192.168.5.1

Last edited by Sayan Acharjee; 10-19-2010 at 08:27 AM.
 
Old 10-19-2010, 09:17 AM   #3
zer0signal
Member
 
Registered: Oct 2010
Location: Cleveland
Distribution: Slackware, Fedora, RHEL (4,5), LFS 6.7, CentOS
Posts: 258

Original Poster
Rep: Reputation: 29
Thx, you are probably correct about the subnet issue; I thought I had it in their before.

/etc/exports
/mnt/data 192.168.5.1/24(rw)

is what I will change it to when I get home from work;

Ill post the results!
 
Old 10-19-2010, 10:09 AM   #4
zer0signal
Member
 
Registered: Oct 2010
Location: Cleveland
Distribution: Slackware, Fedora, RHEL (4,5), LFS 6.7, CentOS
Posts: 258

Original Poster
Rep: Reputation: 29
[root@signal-desktop signal]# mount 192.168.5.198:/mnt/data /mnt/vmdata
mount.nfs: access denied by server while mounting 192.168.5.198:/mnt/data

root@signal-desktop signal]# showmount -e 192.168.5.1
Export list for 192.168.5.1:/mnt/data 192.168.5.198/255.255.255.0


same issue... hrmmm...

Last edited by zer0signal; 10-19-2010 at 10:17 AM.
 
Old 10-19-2010, 11:42 AM   #5
sycamorex
LQ Veteran
 
Registered: Nov 2005
Location: London
Distribution: Slackware64-current
Posts: 5,836
Blog Entries: 1

Rep: Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251
Can it be something related to selinux? Is it enabled? What's its state?
 
Old 10-19-2010, 12:01 PM   #6
zer0signal
Member
 
Registered: Oct 2010
Location: Cleveland
Distribution: Slackware, Fedora, RHEL (4,5), LFS 6.7, CentOS
Posts: 258

Original Poster
Rep: Reputation: 29
Quote:
Originally Posted by sycamorex View Post
Can it be something related to selinux? Is it enabled? What's its state?
Yeah, I was pretty sure I disabled it - which when I checked it was;

[signal@signal-router ~]$ cat /etc/sysconfig/selinux
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - SELinux is fully disabled.

SELINUX=disabled
# SELINUXTYPE= type of policy in use. Possible values are:
# targeted - Only targeted network daemons are protected.
# strict - Full SELinux protection.
SELINUXTYPE=targeted

# SETLOCALDEFS= Check local definition changes
SETLOCALDEFS=0

[signal@signal-router ~]$ uname -a
Linux signal-router 2.6.18-194.17.1.el5.centos.plusxen #1 SMP Thu Sep 30 20:56:28 EDT 2010 i686 athlon i386 GNU/Linux

Last edited by zer0signal; 10-19-2010 at 12:11 PM.
 
Old 10-19-2010, 12:58 PM   #7
sycamorex
LQ Veteran
 
Registered: Nov 2005
Location: London
Distribution: Slackware64-current
Posts: 5,836
Blog Entries: 1

Rep: Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251
Let's try some options:
1.Are all nfs, nfslock and portmap/rpcbind running on the server?
2. What is the output of
Quote:
rpcinfo -p ip_of_the_server
issued from the client?
3. Perhaps try to disable iptables for a moment just to see if that's causing the problem.
4. What's your /etc/sysconfig/nfs?
 
Old 10-19-2010, 01:26 PM   #8
zer0signal
Member
 
Registered: Oct 2010
Location: Cleveland
Distribution: Slackware, Fedora, RHEL (4,5), LFS 6.7, CentOS
Posts: 258

Original Poster
Rep: Reputation: 29
SERVER

[signal@signal-router ~]$ rpcinfo -p 127.0.0.1
program vers proto port
100000 2 tcp 111 portmapper
100000 2 udp 111 portmapper
100024 1 udp 686 status
100024 1 tcp 689 status
100004 2 udp 915 ypserv
100004 1 udp 915 ypserv
100004 2 tcp 918 ypserv
100004 1 tcp 918 ypserv
600100069 1 udp 924 fypxfrd
600100069 1 tcp 926 fypxfrd
100009 1 udp 658 yppasswdd
100011 1 udp 654 rquotad
100011 2 udp 654 rquotad
100011 1 tcp 657 rquotad
100011 2 tcp 657 rquotad
100003 2 udp 2049 nfs
100003 3 udp 2049 nfs
100003 4 udp 2049 nfs
100021 1 udp 34126 nlockmgr
100021 3 udp 34126 nlockmgr
100021 4 udp 34126 nlockmgr
100003 2 tcp 2049 nfs
100003 3 tcp 2049 nfs
100003 4 tcp 2049 nfs
100021 1 tcp 46623 nlockmgr
100021 3 tcp 46623 nlockmgr
100021 4 tcp 46623 nlockmgr
100005 1 udp 668 mountd
100005 1 tcp 671 mountd
100005 2 udp 668 mountd
100005 2 tcp 671 mountd
100005 3 udp 668 mountd
100005 3 tcp 671 mountd

client


[signal@signal-desktop ~]$ rpcinfo -p
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 43324 status
100024 1 tcp 51533 status
100007 2 udp 844 ypbind
100007 1 udp 844 ypbind
100007 2 tcp 847 ypbind
100007 1 tcp 847 ypbind
100021 1 udp 42160 nlockmgr
100021 3 udp 42160 nlockmgr
100021 4 udp 42160 nlockmgr
100021 1 tcp 55900 nlockmgr
100021 3 tcp 55900 nlockmgr
100021 4 tcp 55900 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 40243 mountd
100005 1 tcp 41881 mountd
100005 2 udp 40243 mountd
100005 2 tcp 41881 mountd
100005 3 udp 40243 mountd
100005 3 tcp 41881 mountd

[root@signal-desktop signal]# service iptables status

Table: filter
Chain INPUT (policy ACCEPT)
num target prot opt source destination
Chain FORWARD (policy ACCEPT)
num target prot opt source destination
Chain OUTPUT (policy ACCEPT)
num target prot opt source destination

[root@signal-desktop signal]# service iptables stop
iptables: Flushing firewall rules: [ OK ]
iptables: Setting chains to policy ACCEPT: filter [ OK ]
iptables: Unloading modules: [ OK ]

[root@signal-desktop signal]# mount 192.168.5.1:/mnt/data /mnt/vmdata/
mount.nfs: access denied by server while mounting 192.168.5.1:/mnt/data

[root@signal-desktop signal]# cat /etc/sysconfig/nfs
#
# Define which protocol versions mountd
# will advertise. The values are "no" or "yes"
# with yes being the default #MOUNTD_NFS_V1="no" #MOUNTD_NFS_V2="no" #MOUNTD_NFS_V3="no"
#
#
# Path to remote quota server. See rquotad(8) #RQUOTAD="/usr/sbin/rpc.rquotad"
# Port rquotad should listen on.#RQUOTAD_PORT=875# Optinal options passed to rquotad
#RPCRQUOTADOPTS=""

### Optional arguments passed to in-kernel lockd
#LOCKDARG=
#TCP port rpc.lockd should listen on.
#LOCKD_TCPPORT=32803# UDP port rpc.lockd should listen on.
#LOCKD_UDPPORT=32769

### Optional arguments passed to rpc.nfsd. See rpc.nfsd(8)# Turn off v2 and v3 protocol support
#RPCNFSDARGS="-N 2 -N 3"
# Turn off v4 protocol support#RPCNFSDARGS="-N 4"
# Number of nfs server processes to be started.
# The default is 8.
#RPCNFSDCOUNT=8

# Stop the nfsd module from being pre-loaded
#NFSD_MODULE="noload"
### Optional arguments passed to rpc.mountd. See rpc.mountd(8)
#RPCMOUNTDOPTS=""

# Port rpc.mountd should listen on.
#MOUNTD_PORT=892

### Optional arguments passed to rpc.statd. See rpc.statd(8)
#STATDARG=""

# Port rpc.statd should listen on.
#STATD_PORT=662
# Outgoing port statd should used. The default is port
# is random
#STATD_OUTGOING_PORT=2020
# Specify callout program
#STATD_HA_CALLOUT="/usr/local/bin/foo"

### Optional arguments passed to rpc.idmapd. See rpc.idmapd(8)
#RPCIDMAPDARGS=""
## Set to turn on Secure NFS mounts.
#SECURE_NFS="yes"
# Optional arguments passed to rpc.gssd. See rpc.gssd(8)
#RPCGSSDARGS=""
# Optional arguments passed to rpc.svcgssd. See rpc.svcgssd(8)
#RPCSVCGSSDARGS=""
#

Last edited by zer0signal; 10-19-2010 at 01:30 PM.
 
Old 10-19-2010, 01:40 PM   #9
zer0signal
Member
 
Registered: Oct 2010
Location: Cleveland
Distribution: Slackware, Fedora, RHEL (4,5), LFS 6.7, CentOS
Posts: 258

Original Poster
Rep: Reputation: 29
I mean could it be NIS? I cant imagine cause I had the same setup on my fedora box, with no issues.. I'm really at a loss on this, been kicking it around for a few weeks... Just really dont know my next direction... Thanks again for all the help though! =)
 
Old 10-19-2010, 01:48 PM   #10
Sayan Acharjee
Member
 
Registered: Feb 2010
Location: Chennai, India
Distribution: Manjaro
Posts: 624

Rep: Reputation: 64
Check the permissions of that shared directory.
 
Old 10-19-2010, 02:05 PM   #11
zer0signal
Member
 
Registered: Oct 2010
Location: Cleveland
Distribution: Slackware, Fedora, RHEL (4,5), LFS 6.7, CentOS
Posts: 258

Original Poster
Rep: Reputation: 29
Ok, yeah maybe I should have mentioned this - /dev/sdb1 SATA on a Raid Controller Card - NTFS drive;

now I do have the NTFS module installed - and again "I never had an issue with sharing it out on Fedora"

[signal@signal-router ~]$ ll /mnt/
total 12
drwxrwxrwx 1 root root 8192 Oct 11 11:01 data
drwxr-xr-x 2 root root 4096 Oct 13 21:10 test

[signal@signal-router ~]$ lsmod |grep fuse
fuse 49237 2

http://en.wikipedia.org/wiki/NTFS-3G

Last edited by zer0signal; 10-19-2010 at 02:07 PM.
 
Old 10-19-2010, 08:15 PM   #12
zer0signal
Member
 
Registered: Oct 2010
Location: Cleveland
Distribution: Slackware, Fedora, RHEL (4,5), LFS 6.7, CentOS
Posts: 258

Original Poster
Rep: Reputation: 29


The NTFS module is not enabled in the centoplus (Repositories/CentOSPlus) kernel starting with CentOS-5.3. This is because NTFS in 5.3 is broken. Please see https://bugzilla.redhat.com/show_bug.cgi?id=481495 for details. If you would like to use the NTFS driver from the CentOS kernel, you can do so by installing kmod-ntfs from the ELRepo project. However, unlike ntfs-3g, the write option of the kernel ntfs module iUntils extremely limited

http://wiki.centos.org/TipsAndTricks/NTFS



looks like I am going back to Fedora... =/
Thx for your help guys!
 
  


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
vsftpd 550 Access Denied on CentOS 5 iLinx Linux - Server 4 07-22-2010 09:51 AM
NFS mount mount.nfs: access denied by server while mounting knockout_artist Linux - Newbie 2 11-26-2008 02:36 PM
NFS write access denied on one of two filesystems TomF Linux - Security 2 02-23-2005 08:48 PM
nfs access denied Motown Linux - Networking 1 07-14-2004 12:38 AM
NFS - access denied filsed Linux - Networking 2 03-21-2002 09:56 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat

All times are GMT -5. The time now is 04:13 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