# NFS mount problem [SOLVED]

## ]Trix[

I really dont't know what else to do:

This is the problem:

mount -t nfs gateway://home/storage /mnt/nfs

mount: gateway://home/storage failed, reason given by server: Permission denied

On server machine all required services are started.

rpcinfo -p shows next services running:

portmapper on port 111

status on port 4000

nfs on port 2049

nlockmgr port 32773

mountd on port 4002

On client machine portmap is started.

On the server machine i get this message:

[rpc.mountd] authenticated mount request from 192.168.1.2:701 for /home/storage (/home/storage)

/etc/exports:

/home/storage          192.168.1.2(rw,sync)

/etc/hosts.allow:

ALL : 127.0.0.1

ALL : 192.168.1.2

portmap : 192.168.1.2

mountd : 192.168.1.2

and in /etc/conf.d/nfs i have changed a this two things:

RPCMOUNTDOPTS="-p 4002"

RPCSTATDOPTS="-p 4000"

without portmap specified in hosts.allow i got this massage when trying to mount nfs volume:

mount: RPC: Program not registered

and then... without mountd specified in hosts.allow i got this massage:

mount: RPC: Authentication error; why = Failed (unspecified error)

and now ... I got this: 

mount: gateway://home/storage failed, reason given by server: Permission denied

Why?

Thank you in advance.Last edited by ]Trix[ on Sun Dec 19, 2004 1:59 pm; edited 1 time in total

----------

## d_m

 *]Trix[ wrote:*   

> I really dont't know what else to do:
> 
> This is the problem:
> 
> mount -t nfs gateway://home/storage /mnt/nfs
> ...

 

Some quick observations:

1. You don't need "//", just "/" for NFS. This won't fail (// == / in unix) but it helps differentiate NFS from SMB (which *does* need it).

2. I'm assuming you are mounting as root? I think the NFS client passes the user credentials to the server, so if you are mounting as UID == 1000  then user 1000 on the server better have the same rights.

3. Try using 'all_squash' along with 'anonuid' and 'anongid' to make sure you know which permissions the client machine will have on the share. Also, what permissions does the share have on the server?

4. You might want to temporarily try giving the whole subnet (or even the whole world) access to the share, just to see if it changes anything. The fewer variables there are to worry about, the easier the problem is to find.

Just some suggestions. These things are hard to diagnose for someone else, because often you just change things until it works (and *then* try to figure out what is happening).

Good luck.

----------

## ]Trix[

Solved.

It was wrong path.

----------

