Search code examples
macosubuntuvirtualboxsamba

Virtualbox OSX Host access to Ubuntu Samba share


I am attempting setup of a dev environment using Virtualbox on OSX host running Ubuntu Server 16.10 on guest. I am stuck on getting Samba to share the dev directory on the guest so that ultimately Netbeans can be used to edit the server files on OSX via the share directory. This works fine on OSX to seperate physical Ubuntu machine. From standard Samba config, at the end is

[testsharename]
path=/home/myusername/shared#note trailing slash required
#hosts deny=*
#hosts allow=192.168.0.210#ip of an allowed lan address
guest ok=yes
writeable=yes

The actual share is identified using Finder on OSX however on clicking on it there is an error that it cannot be found. Changing the share name reflects on Finder. The commented out lines are because I only really want a single Lan IP to access.

Finder error is that the operation can't be completed because the original item for "testshare" can't be found


Solution

  • Logs showed Can't mount Samba share (canonicalize_connect_path failed) therefore some research narrowed this down to a permissions issue hinted at by https://ubuntuforums.org/showthread.php?t=1439582

    Moving the share out of the home directory into /var/www/ as I originally required (the home directory part was simply testing things) this, with 777 permissions on the share dir only showed it to work perfectly. I certainly don't agree from the forum post that all path nodes leading to the share require permission changes however.