LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   NFS mount failed, reason given by server: Permission denied (https://www.linuxquestions.org/questions/linux-newbie-8/nfs-mount-failed-reason-given-by-server-permission-denied-688591/)

alirezan1 12-05-2008 01:44 PM

NFS mount failed, reason given by server: Permission denied
 
hi all,

I've been struggling with this NFS mount problem for almost a week now and I am running out of ideas here :( please help!

I have a server named slot5 and a client named slot11 with IP addresses:
Quote:

slot5: inet addr:127.0.204.1 Bcast:127.0.204.255 Mask:255.255.255.0
slot11: inet addr:127.0.210.1 Bcast:127.0.210.255 Mask:255.255.255.0
First question: Is this alright that I have IP addresses starting with 127.0.* for my internal network? or should I change them to some other address?

I have this as my exports file:

Quote:

> cat /etc/exports
/export *(rw,sync,root_squash)
and when I restart my NFS I get:
Quote:

> /etc/init.d/nfs restart
Shutting down NFS mountd: [ OK ]
Shutting down NFS daemon: nfsd: last server has exited
nfsd: unexporting all filesystems
RPC: failed to contact portmap (errno -5).
[ OK ]
Shutting down NFS services: [ OK ]
Starting NFS services: [ OK ]
Starting NFS daemon: NFSD: Using /var/lib/nfs/v4recovery as the NFSv4 state recovery directory
NFSD: starting 90-second grace period
[ OK ]
Starting NFS mountd: [ OK ]
rpcinfo on both machines:

on slot5:
Quote:

> rpcinfo -p
program vers proto port
100000 2 tcp 111 portmapper
100000 2 udp 111 portmapper
100024 1 udp 708 status
100024 1 tcp 711 status
100003 2 udp 2049 nfs
100003 3 udp 2049 nfs
100003 4 udp 2049 nfs
100021 1 udp 32778 nlockmgr
100021 3 udp 32778 nlockmgr
100021 4 udp 32778 nlockmgr
100003 2 tcp 2049 nfs
100003 3 tcp 2049 nfs
100003 4 tcp 2049 nfs
100021 1 tcp 53459 nlockmgr
100021 3 tcp 53459 nlockmgr
100021 4 tcp 53459 nlockmgr
100005 1 udp 901 mountd
100005 1 tcp 904 mountd
100005 2 udp 901 mountd
100005 2 tcp 904 mountd
100005 3 udp 901 mountd
100005 3 tcp 904 mountd
on slot11:
Quote:

> rpcinfo -p
program vers proto port
100000 2 tcp 111 portmapper
100000 2 udp 111 portmapper
100003 2 udp 2049 nfs
100003 3 udp 2049 nfs
100003 4 udp 2049 nfs
100021 1 udp 32768 nlockmgr
100021 3 udp 32768 nlockmgr
100021 4 udp 32768 nlockmgr
100003 2 tcp 2049 nfs
100003 3 tcp 2049 nfs
100003 4 tcp 2049 nfs
100021 1 tcp 59530 nlockmgr
100021 3 tcp 59530 nlockmgr
100021 4 tcp 59530 nlockmgr
100005 1 udp 606 mountd
100005 1 tcp 609 mountd
100005 2 udp 606 mountd
100005 2 tcp 609 mountd
100005 3 udp 606 mountd
100005 3 tcp 609 mountd
showmount on slot5:
Quote:

> showmount -a
All mount points on localhost:
*:/export
*:/tmp
127.0.210.1/255.255.255.0:/export
127.0.210.1:/export

> showmount -e
Export list for localhost:
/export *
showmount on slot11:
Quote:

> showmount -e slot5
Export list for slot5:
/export *
on slot5:
Quote:

> exportfs
/export <world>
here are /etc/hosts.* files:

Quote:

cat /etc/hosts.allow
portmap: ALL
nfsd: ALL
lockd: ALL
mountd, rquotad: ALL
statd: ALL
ALL: ALL
ALL: 127.0.

cat /etc/hosts.deny
<empty>

cat /etc/hosts:
10.0.0.1 localhost localhost.localdomain
127.0.210.1 slot11
127.0.204.1 slot5 localhost localhost.localdomain

# The following lines are desirable for IPv6 capable hosts
# (added automatically by netbase upgrade)

::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
mount on slot5:
Quote:

> mount
rootfs on / type rootfs (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw)
tmpfs on /dev/shm type tmpfs (rw)
rpc_pipefs on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
nfsd on /proc/fs/nfsd type nfsd (rw)
and when I want to mount:
Quote:

> mount slot5:/export /mnt/
mount: slot5:/export failed, reason given by server: Permission denied

One thing I realized is that, I don't have "none" in my mount output. Can that cause a problem?

Thanks!

alirezan1 12-05-2008 01:47 PM

A couple of things I forgot to mention in my previous email. Here is the output of log/daemon.log:

Quote:

Jan 1 19:30:23 localhost mountd[2845]: authenticated mount request from slot11:
747 for /export (/export)
Jan 1 19:31:07 localhost mountd[2845]: Caught signal 15, un-registering and exi
ting.
Jan 1 19:31:14 localhost mountd[2918]: authenticated mount request from slot11:
749 for /export (/export)
and here is the NFS section of my kernel .config file:

Quote:

#
# Network File Systems
#
CONFIG_NFS_FS=y
CONFIG_NFS_DEF_FILE_IO_SIZE=4096
CONFIG_NFS_V3=y
CONFIG_NFS_V3_ACL=y
CONFIG_NFS_V4=y
CONFIG_NFS_DIRECTIO=y
CONFIG_NFSD=y
CONFIG_NFSD_V2_ACL=y
CONFIG_NFSD_V3=y
CONFIG_NFSD_V3_ACL=y
CONFIG_NFSD_V4=y
CONFIG_NFSD_TCP=y
CONFIG_LOCKD=y
CONFIG_LOCKD_V4=y
CONFIG_EXPORTFS=y
CONFIG_NFS_ACL_SUPPORT=y
CONFIG_NFS_COMMON=y
CONFIG_SUNRPC=y
CONFIG_SUNRPC_GSS=y
CONFIG_RPCSEC_GSS_KRB5=y
# CONFIG_RPCSEC_GSS_SPKM3 is not set
# CONFIG_SMB_FS is not set
# CONFIG_CIFS is not set
# CONFIG_NCP_FS is not set
# CONFIG_CODA_FS is not set
# CONFIG_AFS_FS is not set
# CONFIG_9P_FS is not set

any my linux is a redhat based

Thanks

isourabh.wadhwa 12-13-2012 01:18 AM

exactly the same issue I am facing.

I've read somewhere, this would help:
on client: mount -t nfsd -o rw,auto,defaults nfsd /proc/fs/nfsd

but it didnt worked for me. you can try.

propofol 12-13-2012 01:42 AM

I am not sure if this has anything to do with your problem, but should the mask not be 255.255.0.0 for the addresses you are using?

Quote:

slot5: inet addr:127.0.204.1 Bcast:127.0.204.255 Mask:255.255.255.0
slot11: inet addr:127.0.210.1 Bcast:127.0.210.255 Mask:255.255.255.0

linosaurusroot 12-13-2012 02:04 AM

127.*.*.* is a loopback address and the two hosts will not see each other while they use it - they will each see themselves. Get new internal addresses such as in 192.168.*.*/16.


Only the server wants /etc/exports and the service running.

chrism01 12-13-2012 02:57 AM

Can I just point out the qn is from 2008; SW has changed since then and I doubt the OP is still waiting.


All times are GMT -5. The time now is 06:37 PM.