nfs trouble

boz

Registered
Hi,
I got problems using nfs volumes. I can mount them okay and they appear in the mount table when I type mount. But if I try to cd to the mount point e.g. /mnt I get a Permission denied! even as root! I don't know whats wrong and how to debug my problem. Any ideas? Somebody got this working?

Thanks
BoZ
 

onan

Prescriptivist
Could be one (or both) of two issues:

First, the nfs server could be exporting the volume 'rootsquash'. This usually remaps the root user to 'nobody', which may not have read permissions there. This could be solved either by being a user with the same uid as a user on the server with permissions, or exporting the volume norootsquash.


But more likely, it's a source ports issue. (I don't know how famliar with ip you are, so forgive me if I'm too didactic.)

Most nfs servers only like to be talked to with connections originating from ports 1-1023 on your machine. (These are traditionally referred to as 'secure' or 'protected' ports, though their only significance is that only root can bind to them.) MacosX, however, binds to 'high' ports (1024-65535) for nfs mounts.

Ideally the nfs server would just refuse to let you mount in this case. But some servers (linux in particular) will let you mount them, but then refuse everything afterward.

Solution: add the "insecure" option to the exported voluem on the server. (Which isn't as bad as it sounds; it's not actually less secure in any way.)

 

boz

Registered
Hi,

thanks for your help. The nfs server is a OpenBSD box and I do not have root access to this machine. Can I force mount on osx to use ports < 1024 ?

BoZ
 
Top