LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   I am trying to get nfs to work, but my client machine . . . (https://www.linuxquestions.org/questions/linux-networking-3/i-am-trying-to-get-nfs-to-work-but-my-client-machine-848395/)

darkstarbyte 12-04-2010 06:41 PM

I am trying to get nfs to work, but my client machine . . .
 
I am trying to get nfs to work, but my client machine keeps telling me permission denied. Is there a simple solution?

This is the first time I have used nfs.

The two OS's are Gentoo and Linux mint. They both have nfs installed on them.

They are both a 16 port 10/100 Mb/s switch.

AlucardZero 12-04-2010 09:39 PM

Make sure you have set up /etc/exports so that the client has permission to mount, then re-export the shares.

darkstarbyte 12-04-2010 09:43 PM

This is what the file looks like.

[code]
# /etc/exports: NFS file systems being exported. See exports(5).
/storage 192.168.1.2(rw) # Clients IP address.
[code]

Well I am unsure if that is what is needed.

AlucardZero 12-04-2010 10:01 PM

Ok, and did you start the NFS server daemon?

If you run "showmount -e servername" what is returned?

darkstarbyte 12-04-2010 10:03 PM

Code:

localhost branden # showmount -e servername
showmount: can't get address for servername
localhost branden #


AlucardZero 12-04-2010 10:52 PM

You need to replace "servername" with the name (or IP) of your NFS server.

darkstarbyte 12-04-2010 11:01 PM

Code:

localhost ~ # showmount -e 192.168.1.5
Export list for 192.168.1.5:
/storage 192.168.1.2
localhost ~ #


AlucardZero 12-05-2010 09:05 AM

Looks fine to me. What makes you think it isn't working?

darkstarbyte 12-05-2010 03:00 PM

The client keeps saying something denied access from server.

Edit:
This is what the client says.

Code:

laurie@laurie-desktop ~ $ sudo mount 192.168.1.5:/storage /mnt/nfs
mount.nfs: access denied by server while mounting 192.168.1.5:/storage
laurie@laurie-desktop ~ $


AlucardZero 12-05-2010 03:50 PM

Ok, and is there any relevant message in /var/log/messages or /var/log/syslog about this on the server?

I assume the client is really 192.168.1.2 and the server is really 192.168.1.5?

darkstarbyte 12-05-2010 04:03 PM

Quote:

Originally Posted by AlucardZero (Post 4181591)
Ok, and is there any relevant message in /var/log/messages or /var/log/syslog about this on the server?

I assume the client is really 192.168.1.2 and the server is really 192.168.1.5?

Those are the ip's and there is no relevant information in those logs.

markush 12-05-2010 05:00 PM

Hi darkstarbyte,

as far as I know the daemon nfsd is listening on port 2049. You may use nmap to check if the port is really open.
Code:

nmap -p 2049 192.168.1.5
You may use this command either on the client or on the server.

Markus

darkstarbyte 12-05-2010 05:13 PM

Quote:

Originally Posted by markush (Post 4181650)
Hi darkstarbyte,

as far as I know the daemon nfsd is listening on port 2049. You may use nmap to check if the port is really open.
Code:

nmap -p 2049 192.168.1.5
You may use this command either on the client or on the server.

Markus

localhost branden # nmap -p 2049 192.168.1.5

Starting Nmap 5.21 ( http://nmap.org ) at 2010-12-05 10:14 MST
Nmap scan report for 192.168.1.5
Host is up (0.00012s latency).
PORT STATE SERVICE
2049/tcp closed nfs

Nmap done: 1 IP address (1 host up) scanned in 0.14 seconds
localhost branden #

markush 12-05-2010 05:19 PM

Quote:

Originally Posted by darkstarbyte (Post 4181658)
localhost branden # ...
Host is up (0.00012s latency).
PORT STATE SERVICE
2049/tcp closed nfs...

Well, here we are, the port is closed. There must be a problem with the configuration of the server.
Did you restart the daemon after editing the /etc/exports file?

Markus

darkstarbyte 12-05-2010 05:49 PM

How would I do that?

markush 12-06-2010 01:30 AM

I don't know about the directory-structure of Mint. There should be a directory /etc/init.d or /etc/rc.d where the daemons reside which are started by the startscripts. Look which name the daemon has in your distribution, nfsd or rc.nfsd. then execute
Code:

/etc/init.d/nfsd restart
or whatever the correct path for the daemon on your system is.
Be sure to configure nfsd to start while systemstart.

Markus


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