kristen kristen - 4 months ago 31
Linux Question

How do I use a Samba server location for GOPATH?

I am trying to set my GOPATH to a shared network folder. When I enter

export GOPATH=smb://path/to/shared/folder


I get:

go: GOPATH entry is relative; must be absolute path: "smb".
Run 'go help gopath' for usage.


I've also tried to prefix the path w/ "/" but then it tries to make a folder in root.

thx!

Amd Amd
Answer

there is only one solution for this:
Map ( mount) a Samba server file path as a Local Disk Drive ( local path), then set GOPATH to this local path:

Mounting SMB share on local folder by using smbmount command (smbmount is deprecated):

smbmount //ipadd/sharename /mountpoint –o  username=userid,workgroup=workgroupname

Example :

smbmount //192.168.0.1/share1 /mnt –o username=steev,workgroup=test

Mounting SMB share by using mount command

mount –t smbfs ipadd:/sharename /mountpoint –o username=userid,workgroup=workgroupname

Or

mount –t smbfs //ipadd/sharename /mountpoint –o username=userid,workgroup=workgroupname

Example :

mount –t smbfs 192.168.0.1:/share1 /mnt –o username=surendra,workgroup=test

ref:
http://www.linuxnix.com/8-ways-to-mount-smbfs-samba-file-system-in-linux/

http://askubuntu.com/questions/232998/how-do-i-install-smbmount http://www.howtogeek.com/116309/use-ubuntus-public-folder-to-easily-share-files-between-computers/
and for Windows: http://serverfault.com/questions/6079/how-can-i-mount-an-ftp-to-a-drive-letter-in-windows