SEARCH

How-To Geek

Use Ubuntu’s Public Folder to Easily Share Files Between Computers

image

You’ve probably noticed that Ubuntu comes with a Public folder in your home directory. This folder isn’t shared by default, but you can easily set up several different types of file-sharing to easily share files on your local network.

This folder was originally meant for the Personal File Sharing tool, which is no longer included with Ubuntu by default. You can install the Personal File Sharing tool or use Ubuntu’s built-in file-sharing feature to share files.

Samba Sharing

Ubuntu’s built-in file-sharing tool uses Samba, which is interoperable with Windows. Windows PCs on the local network will be able to view your shared folder if you share it this way.

To share the Public folder – or any other folder, there’s nothing special about the Public folder when it comes to Samba sharing – right-click it and select Properties. You’ll find a Share tab in the properties dialog.

image

Share a folder and you’ll be prompted to install the Samba software. Click the Install service button and follow the prompts to install Samba and restart your desktop session.

image

After you’ve installed Samba, you can easily share the folder and set the sharing permissions as restrictive or as permissive as you want them to be. Enable the Allow others to create and deletes files in this folder and Guest access check boxes and other computers on the local network will be able to easily add files to the folder without entering a password. Click the Create Share button after selecting your options.

image

Select Browse Network in Ubuntu’s file manager to view your network shares.

image

Personal File Sharing

The Personal File Sharing tool – also known as gnome-user-share – was the original reason for the Public folder. It uses Apache to offer convenient WebDAV-based file sharing, but doesn’t work with Windows systems. It supports Bluetooth file sharing, too. To use it, you’ll have to install the appropriate packages:

sudo apt-get install gnome-user-share apache2.2-bin libapache2-mod-dnssd

image

After you do, you’ll find the Personal File Sharing application in your Dash.

image

With the Personal File Sharing application, you can enable easy sharing of your Public folder over the network – it only works with the Public folder, not other folders. You can require a password never, when  writing files, or whenever the share is accessed. You an also enable easy sharing and receiving of files in the Public folder over Bluetooth.

image

Open the Network pane in the Nautilus file browser and you’ll see each Public folder shared on the network.

image

Chris Hoffman is a technology writer and all-around computer geek. He's as at home using the Linux terminal as he is digging into the Windows registry. Connect with him on Google+.

  • Published 06/11/12

Comments (6)

  1. TheFu

    Very cool. I didn’t know there was an easy GUI for this stuff.

    We aren’t limited to which folders we can share on Linux. Any directory can be shared in lots of different ways. I’ve shared /Data to many other machines with NFS, Samba and through block replication simultaneously. There is no rule that only one method of sharing can be used. Mix whatever you need based on the clients.

    Samba is the defacto file sharing method for interoperability – OS-X mostly works with it and MS-Windows definitely does. I’ve found Android “file browsers” that do too. In a mixed environment, samba is king. A few HowTos: http://www.howtoforge.com/howtos/samba I prefer samba for streaming media too, which sucks if you have certain “proprietary” players that refuse to support this most-open of standards. Relatively recent security changes to samba changed the way that soft-linked directories/files work, so you may need to add an option to the /etc/samba/smb.conf to allow “wide links” if you use softlinks. Also, samba is good for trusted LANs, not a good idea over the internet.

    For Linux-to-Linux sharing Samba works, but doesn’t provide the same control over file permissions. For that, we need to use NFS or sshfs or iSCSI.

    NFS is file sharing all grown up. To a user, they can’t tell that the files aren’t actually located on the machine they are using. It is THAT good. Full control over permissions and the entire POSIX capabilities. NFS works best UNIX-to-UNIX and there haven’t been interoperability issues in a decade. It just works. OSX and Linux talk great this way – well, OSX can mount NFS shares from Linux – I don’t know about the other way around. An Ubuntu HowTo: http://www.howtoforge.com/setting-up-an-nfs-server-and-client-on-ubuntu-10.04 but there are howtos for every Linux. NFS **does** require root and it should be used on trusted LAN networks. The connections are not encrypted, so over the internet is a bad idea.

    Sshfs rocks. Anywhere you can use ssh, you can mount a remote file system over an ssh tunnel. There are limitations on the capabilities of the mounted filesystem, but for 95% of what we all want, it works great, over an encrypted tunnel, and you don’t need to be root. A HowTo: http://www.howtoforge.com/mounting-remote-directories-with-sshfs-on-ubuntu-11.10

    WebDAV is one of those things that seems like a fantastic idea … until you see all the security problems with it. WebDAV for read-only stuff is probably fine, but if anyone can write to the directories using webDAV, it seems there are huge risks. Perhaps those have all been plugged, but since there are other alternates without questions, best to use them. WebDAV never worked all that well in real-world use anyway, at least the implementations that I’ve seen/used.

    If you want to share media, then the method that your playback device(s) support matters. There are DLNA servers for Linux, Samba works for most non-Apple devices and the Apple media sharing protocol is available as a service on Linux too (sorry, can’t recall the name).

    There are other, more complex and more capable network file systems for Linux too like GlusterFS http://www.gluster.org/ . If you need to replicate storage across the room or to a different continent in near-real-time, it is possible.

    Lots of people are posting HowTos on youtube, slideshare and hundreds of blogs too. Knowing how-to ask google the question is all it takes. Chances are that your Linux distro of choice posts detailed how-to guides on their help or support forums too. https://help.ubuntu.com/ is an example to bookmark for Ubuntu.

  2. cam2644

    Again some really useful info for the increasing number of people using Ubuntu based systems.Thanks

  3. -Akami-

    Thanks for all the recent linux coverage!

  4. RidiculouStuff

    Thanks, was thinking about this just the other day. Your site is a big help with your articles on Ubunto how-to’s.

  5. Josh B.

    How would an encrypted home directory affect sharing the Public folder?

  6. Active Directory Auditing

    Hello All,

    This is a great blog. Thanks for all your hard work and the info you give.

Get Free Articles in Your Inbox!

Join 134,000 newsletter readers

Email:

Go check your email!