Posted by Mike Lowen on June 4, 2010, 2:59 PM

Using FTP storage like a local folder on Linux

Recently here at theCloud we launched our online storage offering so I thought that I’d share with you a neat little trick that I recently learned.  For those of you out there in Linux land did you know that you can mount your cloud storage as a local folder?  Thanks to curlftpfs you can,  I’m running Ubuntu 9.10 so my instructions will be tailored to that but these instructions should work on any Debian based Linux distro or it should be easy enough to figure out what you need to change to get it working on your distro of choice.

For this first step you will need root/sudo access on the machine your working on.  To install curlftpfs on a Debian based system (like Ubuntu) you run:

sudo apt-get install curlftpfs

Now we have that done we need somewhere to mount the file, it’s important that you are able to write to this location I noticed that I had issues when I tried to use mount it with sudo.  What I ended up doing was just creating a directory in my home folder:

mkdir ~/theCloud

Now that we have curlftpfs installed and a directory created mount to it’s time to make the connection the following command will take care of this for you:

curlftpfs ftp://[username]:[password]@store.thecloud.net.nz ~/theCloud

Where in the above you replace [username] and [password] with the username and password you got when you signed up for storage.  As I mentioned earlier I had issues running the above command as root as it locked the folder and I wasn’t able to get in, if you find you are having the same problem then the following command will unmount storage:

fusermount -u ~/theCloud

You’ll notice that when you restart your machine that storage will no longer be mounted in which case you’ill have to re-run the command above.  There are two options available to you if you want storage automatically mounted the first is to have the command we give you here run each time you log-in, I won’t go into that here as how you do this can differ from distro to distro.  The other method is to add an entry to you /etc/fstab file the curlftpfs site suggests that the following line should do the trick:

curlftpfs#[username]:[password]@store.thecloud.net.nz /mnt/theCloud fuse rw,uid=500,user,noauto 0 0

In the above example I had also created a user independent directory at which to mount storage.  I was unable to get this to work I don’t know if that is an issue on the part of myself or curlftpfs.  If you do get it working with fstab leave a comment letting me know what I need to change to get it up and running.

Tags: , , ,
Category: Cloud Services, Linux  | Comment (RSS)  | Trackback

Leave a Reply