2

I'm trying to set up an NFS server on my Ubuntu server to be accessed from my Mac OS X 10.6.4 desktop. I started on the Ubuntu side by following this guide (the quick start). When I finally try to access the NFS share on the Mac I get this:

[/Network] cd fileserver 
cd:cd:1: permission denied: fileserver

I finally got this working. I'll outline how below.

Server Setup (Ubuntu 10.10)

/etc/exports

/export                 *(rw,sync,no_root_squash,no_subtree_check)
/export/fileserver      *(rw,sync,no_root_squash,no_subtree_check)
/export/fileserver2     *(rw,sync,no_root_squash,no_subtree_check)

/etc/fstab

/fileserver/a/root   /export/fileserver  none   bind          0       0
/fileserver/b/root   /export/fileserver2 none   bind          0       0

Client Setup (Mac OS X 10.6.7)

The key problem was that id -u tsigo on the server was 1000, and on Mac it was 501. In order to change this I followed this guide which -- be warned -- was fraught with potential disaster; follow directions closely. If I were doing it again I would change my ID on the server instead.

After changing my user ID and rebooting, it was mostly straight forward.

Open Disk Utility, go to File > NFS Mounts and add a new entry.

NFS URL: nfs://gluttony/export/fileserver Mount location: /Network/fileserver Advanced mount params: -i,-s,-P

4
  • What are the permissions?
    – TheLQ
    Commented Jul 22, 2010 at 1:57
  • Added to the bottom of the question.
    – rspeicher
    Commented Jul 22, 2010 at 19:37
  • ... and your uid on the Mac equals to one that is in Ubuntu? Commented Aug 5, 2010 at 7:06
  • It does not. Mac is 501, Ubuntu is 1000.
    – rspeicher
    Commented Aug 6, 2010 at 0:55

2 Answers 2

2

Correct you need the same uid's on client and server. Though you can achieve this without 'changing' the owners of the files on client or server. If you use anonuid and all_squash in your export file you can map any uid you would like to the client that is accessing the share.

Example exports file:

/home/brian   *(rw,async,no_subtree_check,insecure,anonuid=1000,all_squash)

Given that /home/brian permissions are drwxr-xr-x 24 1000 1000 you'll have full access. Hope this helps.

P.S. this should apply to anongid also but for some strange reason it doesn't.

1

You need to have same uid between the two computers. If you Mac user has an uid 501 and Ubuntu 1000, then with your current permissions you will correctly get "Permission denied". See, you only have full access for user tsigo and everyone else has only read access to directories.

You either need to make the uid match or grant more privileges to group and/or others. A read permission is not enough to let anyone enter a directory, you need grant also +x.

1
  • I did chmod -R a+rx /fileserver on the server and it's still a no-go.
    – rspeicher
    Commented Aug 6, 2010 at 17:48

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .