Skip to main content

How-to: Free Encrypted Online Storage on Ubuntu

So, since I've gotten Ubuntu setup the way that I want on my workstation, I've been trying to figure out a good way to back up everything that is free, encrypted, and doesn't run the risk of media dying. The solution? Using gmailfs + encfs to mount a spare GMail account and use that 5GB of space for something other than porn and penis-enlargement spam. I'll detail in another post how to setup the actual backup, but here I'll cover setting up the encrypted, online mount point in Ubuntu 7.10 (which will probably work for other distros).

  1. Create a new GMail account, preferably with some sort of random name. Generate this from a shell by running the following command:
    cat /dev/urandom | strings -n 8 | head -1
    This will give you an 8 character string, that's pretty random. This will also ensure that you won't get any spam thrown into your new storage account.
  2. Install the necessary packages.
    sudo apt-get install gmailfs encfs fuse-tools python-setuptools
  3. Upgrade the gmailfs python library (the version in the package from the apt repositories is out of date, and won't work).
    sudo easy_install --upgrade libgmail
  4. Edit /etc/gmailfs/gmailfs.conf, replacing username= and password= with the correct settings for your new GMail account.
    sudo vi /etc/gmailfs/gmailfs.conf
  5. Create a mount point for your new online storage:
    sudo mkdir /media/gmail
  6. Mount your GMail account:
    sudo mount.gmailfs /usr/share/pycentral/gmailfs/site-packages/gmailfs.py /media/gmail/ -o username=XXXXXXX,password=XXXXXX -e
  7. Follow the encfs setup instructions. I just used the standard settings.
  8. You now have encrypted, online storage! Congrats.

Trackback URL for this post:

http://www.jbip.net/trackback/13

how to change owner / add permission

hi there, thanks for the great how to, was wondering how to change permission so that a user can access and unmount the gmail drive. when I followed your instructions, only root can access or unmount.
thanks!

Modify the fstab entry and

Modify the fstab entry and add user to the options.