2

I'm trying to share files from my Mac to a web server hosted in VirtualBox running Centos.

Mac

I've created the file /etc/exports. It has the following line

/Users/jason/projects -alldirs -network 192.168.56.0 -mask 255.255.255.0

Centos

Installed nfs

Created a directory mkdir -p /mnt/nfs/

Then try to mount the shared folder from the mac server with the command

mount -v 192.168.56.1:/Users/jason/projects /mnt/nfs/projects

But if doesn't work and i get this message

mount: no type was given - I'll assume nfs because of the colon
mount.nfs: timeout set for Thu Oct 10 12:39:14 2013
mount.nfs: trying text-based options 'vers=4,addr=192.168.56.1,clientaddr=192.168.56.5'
mount.nfs: mount(2): Protocol not supported
mount.nfs: trying text-based options 'addr=192.168.56.1'
mount.nfs: prog 100003, trying vers=3, prot=6
mount.nfs: trying 192.168.56.1 prog 100003 vers 3 prot TCP port 2049
mount.nfs: prog 100005, trying vers=3, prot=17
mount.nfs: trying 192.168.56.1 prog 100005 vers 3 prot UDP port 867
mount.nfs: mount(2): Permission denied
mount.nfs: access denied by server while mounting 192.168.56.1:/Users/jason/projects

If i run showmount -e 192.168.56.1 from the centos machine, it shows what I expect

Export list for 192.168.56.1:
/Users/jason/projects 192.168.56.0

Is there some setting that I've missed? (I've never done this before so apologies if its obvious)

3
  • Can you ping from host to guest and viceversa? Oct 11, 2013 at 10:16
  • Yes. I currently have an apache server running in the guest. I'm using VirtualBox's shared folders to serve my files but it's so slow i'm looking for alternatives to this
    – JasonM
    Oct 11, 2013 at 15:43
  • And have you installed the Extension Pack? Have you configured the shared folder in the VM settings under "Shared folder"? Oct 11, 2013 at 15:53

2 Answers 2

0

Try nitro share. It works for Windows, Linux and Mac OS.

1
  • I'll check this out and see if it helps
    – JasonM
    Oct 11, 2013 at 15:44
0

even for the very old post (6 years), it has more than 1000 views, so I thought I might give a reply. Had the same error message with MacOS Mojave 10.14.6, I tried Ubuntu, OpenSuSe and others:

mount.nfs: access denied by server while mounting 192.168.x.y:/Data/tmp

I had to add a line to /etc/nfs.conf on the Mac:

nfs.server.mount.require_resv_port = 0

and of course

sudo nfsd restart

Then it worked. It is also valid vice versa. If OSX shall mount a UNIX NFS share, then the mount command should include the "resvport". Explanation: see "man mount_nfs".

You must log in to answer this question.

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