Network File Sharing Mechanisms in Ubuntu

I have noticed Ubuntu has several mechanisms to share folders with other machines on a network:

  1. For example, if I am in Nautilus (the file manager), I can right click on a folder, go to Properties, and then go to the tab Share and activate Share this folder.

  2. I can also install samba, edit the file /etc/samba/smb.conf to enable access to a specific folder and start the service.

I noticed that if I use both approaches simultaneously to enable access to the same folder, I can actually see two links to the same folder on Explorer when I access my machine through a network path from Windows.

My questions are:

  1. What is the first mechanism based on? (is it running another instance of samba behind the scenes? If so, where is the smb.conf file for it?

  2. Why the redundancy?

  3. Are there any other mechanisms to share folders?

For reference, this is all on Ubuntu 12.04, from a virtual machine (Virtual Box) from within Windows 7 64.


Solution 1:

Both mechanisms are based on Samba. The first time you share a folder from Nautilus, it prompts you to install Samba. The configuration is managed by Nautilus ; you don't need root access (except to install Samba).

Other ways of sharing files...

  • SFTP : install openssh and you get secure FTP which will work with clients like Filezilla (GUI) or plain old scp
  • VirtualBox : The guest extensions include a mechanism for mounting folders from your host - create shared folders and mount them as instructed in the manual
  • NFS : The Linux network file system
  • RDP sharing : The rdesktop utility can provide access to client folders on the server using the -disk option
  • FTP : the bog standard
  • And more...

Of these? I use RDP shares, VirtualBox shares, SFTP, and I mount CIFS / SMB shares on Linux.