File sharing between Mavericks and non-Macs

filefile-sharingfile-transfersharingwifi

I am using a MacBook running Mavericks and my brother is on a Linux box; and we often need to exchange files between each other. Both the laptops are Wi-Fi enabled and I also understand that Mac does allow file sharing over Wi-Fi. While I do know that Airdrop works only for Apple devices, I am sure there must be some way to share files with non-Apple devices using the built-in WiFi capabilities. Any suggestions around how? I have tried checking the file sharing option in the Preferences >> Sharing module but it didn't help. Is it possible to share files with a Linux user using SMB or AFP? I understand FTP is an option but connecting using FTP involves a lot of Terminal steps each time, i.e., activating FTP, sharing password with the user, connecting, and then closing FTP. Is there any simpler method?

Here are the steps I followed:

First of all I enabled guest sharing on my Mac:

enter image description here

Then I activated file sharing on my Mac and designated my Public folder as the share point (default).

enter image description here

Then I tried the following address on my Ubuntu's Nautilus:

smb://172.17.8.212/Public

It then asked for user name, domain, and password and I entered guest for all three, as advised by @deeviate. And this gave the following error:

enter image description here

P. S.: I am NOT interested in installing any third-party tool for this job. Mac gives SMB as a part of the OS and thats what I want to use. There might be tools out there that work better than SMB, doesn't matter. I still should be able to use SMB if my OS provides it natively!

Best Answer

regarding getting your SMB sharing connection from linux working...

Samba no more, mount.cifs needs extra options, "nounix,sec=ntlmssp"

Don't use the linux gui to connect, have bro open a terminal and try these commands

(and dig my ascii art!)


          =^..^=       `·.¸¸ ><((((º>.·´¯`·><((((º>   

amitsbrother@linux:~$ 
amitsbrother@linux:~$ sudo apt-get install cifs-utils
  ...
amitsbrother@linux:~$ mkdir /mnt/mavericks_smb
amitsbrother@linux:~$ mount.cifs //172.17.8.212/smb_share /mnt/mavericks_smb/ -o user=amitsbrother,password=trustno1,nounix,sec=ntlmssp
amitsbrother@linux:~$ 
amitsbrother@linux:~$ mkdir /mnt/mavericks_smb_dup
amitsbrother@linux:~$ mount -t cifs //172.17.8.212/smb_share /mnt/mavericks_smb-dup -o username=amitsbrother,password=trustno1,nounix,sec=ntlmssp

Once this is working, you can create a script for your brother to automatically mount when it is executed from the gui. Basically, the script is just the mount point creation, and the cifs connection to the smb server... so 2 or 3 lines including the shebang.


Make sharing work now with no passwords

To make it super simple, I'd enable web sharing on the Mac, and put the files you want to share to the Linux box in a folder in ~/Sites/a_folder/ . Then give your brother the address that it tells is your personal web sharing address in the Sharing Preferences pane when you enabled Web Sharing. Tell your brother to open a browser and put in that address; it will give him a directory listing as long as there is no index.html file in there. He can download files with his browser. This is one way sharing, from the Mac to the linux box, and will work fine as long as there are no files over 4GB (unless apache fixed that issue and didn't tell me about it). I believe directory listing is enabled by default on the Mac apache2 server.

To share in the other direction, from linux to Mac, you could do the same from the Linux box:

 sudo apt-get install apache2

You can enable directory listings on the Linux apache2 server with instructions here. Those instructions inadvertantly also cover how to get the apache2 server up and running. Then you need the ip address of the Linux box, and the relative location from the apache root to see the files in your Mac's browser.

This shouldn't take 5 minutes to set up 2 x 1-way sharing through browsers on both boxes, and relieves you from hacing to trouble-shoot the slightly more complex task of installing and configuring netatalk or running SMB sharing from the mac and getting the linux client to mount it, which isn't always a "it just works" situation, like running 2 apache2 servers is.