# Accessing NFS shares from Mac OSX

## hal9000

I just set up a fresh Gentoo system after a harddrive crash. I had been using NFS to access files from my iBook on my Gentoo box. After freshly reinstalling Gentoo, I can't seem to access the NFS shares anymore. 

Using the "Finder" method in OSX (<apple>-K in Finder, then nfs://server/path) I get 

```
Could not connect to the server because the name or password is not correct.
```

If I try to mount in a console window this happens:

```
mount sobe:/home/hal test

mount_nfs: /Users/hal/test: Protocol not supported
```

Unfortunately I have no other Linux systems to test as clients, so I am not even sure if the problem is due to the server or client. 

My /etc/exports on the server includes the following line for the directory in question:

```
/home/hal  <IP of my iBook> (rw,root_squash,insecure)
```

Any ideas?

----------

## NeddySeagoon

hal9000,

Use the gentoo box as both a client and a server and nfs mount the exported filesystem on the box doing the exporting. Its not a useful thing to do normally but it does work.

You may need to add to the exports file if it contains a single IP, rather  than a subnet that includes both machines.

----------

## hal9000

thanks for the suggestion, I just changed the /etc/exports by replacing the IP of my iBook with 'localhost' for the directory. I was able to mount the directory without any problem:

```
mount localhost:/home/hal test
```

So it seems it is an issue with Mac OSX?

----------

## NeddySeagoon

hal9000,

Or something has changed that the Mac doesn't like.

Are you using a ssh tunnel ?

With a new install, the ssh fingerprint will change and any machine that has connected before will detect that.

============= edit =================

Your error message says 

```
Protocol not supported
```

there are two different NFS protocols, ver 3 and Ver 4. Are you using the right one?

----------

## hal9000

Neddy,

I do have ssh up and working again with the new keys, but am not tunneling. I am not sure about the NFS protocol versions, I never worried about this before. Which version do I need? How do I know which version I am using?

----------

## NeddySeagoon

hal9000,

I was hoping you wern't going to ask that. Its kernel options.

I normally include both but I only share with other Gentoo boxes.

----------

## hal9000

well, I checked my kernel options and changed a few things. I had selected 

```
File Systems -> Network File Systems -> NFS server support
```

 but not 

```
Provide NFSv3 server support
```

Added that, recompiled and rebooted. 

I can now mount the share   :Smile: 

But when I try to open it, I get 

```
The folder XX could not be opened because you do not have sufficient access privileges.
```

So I guess I will have to start playing with file privileges, squashing, etc. And I though this was going to be easy  :Wink: 

----------

## eniac

I had about the same problem but I get:

```
 Operation not permitted
```

And it's not a root problem ..

----------

## mphilips

Having the same problem - anyone ever figure out the solution?

On MacOSX 10.4.3 Tiger I get:

```
The folder "mphilips" could not be opened because you do not have sufficient access privileges.
```

----------

## patrick295767

 *mphilips wrote:*   

> Having the same problem - anyone ever figure out the solution?
> 
> On MacOSX 10.4.3 Tiger I get:
> 
> ```
> ...

 

Hi Guys, 

I am having also similar problems with mounting NFS with my MAC, with the LINUX SERVER. 

(It looks like that there is a non trivial issue to make it work) (my post under mac user forum http://macusersforum.com/index.php?showtopic=11037 Same subject in parallel)

Is there someone who foudn the solution how to make it ?

Thank you very much !!

----------

## divinegeek

It's been a while since I've toyed with NFS and OS X, but if I recall, it was helped to have the same username on both the os x box and the gentoo box and also to export the share with the insecure_port flag (or something to that extent).

-KM

----------

