Problem with NFS

I've tried setting an nfs server up on my Linode. For some reason I keep getting the following error from my pc.

mount_nfs: can't access /data: Permission denied

I've looked at the message log on my server and I see the following

mountd[5209]: refused mount request from ***** for /data (/data): illegal port 50282

My exports file looks like this

/home  *(rw,sync)
/data  *(rw,sync)

I've tried connecting from a Redhat VM and from my mac. When I was on my Redhat VM I was logged in as root, and on the mac I'm logged in as myself.

Where am I going wrong?

2 Replies

Historically, NFS requests have been required to come from a port below 1024 (a "secure" port… ha!).

Mac's (by default) dont' do this. You could add "-o resvport" to the mount command or, probably better, tell the Linux machine to not require this option ("insecure" in the exports file).

eg

/home *(rw,sync,insecure)

Really, though, do you want to export "*" - to the whole world?!

Thanks for your help. I will try this. I'm still not sure why my request is coming in from a higher port? Not quite sure how it is worked out? Where is it set on my mac?

As for the *, I was under the impression that you put an ip address here. The thing is I've got a dynamic ip at home, so I'm not sure what I would put there? Because if I put what it is now, then tomorrow I reset my router, well I'm going to get a different ip.

Edit: Just tried again and I still get permission denied but I don't get the illegal port error

Mar 7 19:45:10 testbox mountd[10542]: authenticated mount request from **** for /data (/data)

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct