Archive for April 2nd, 2006

HOWTO: mount ftpfs under linux

Sunday, April 2nd, 2006

1&1's Dedicate Servers come with a free FTP backup account that is only accessible within the server, and has a capacity matching the server's harddrive. Wouldn't it be nice if I don't have to use text-only ftp command to put, get files from that server? Yeah, mount it as an directory.
There are couple options available:

FTPFS is obsolete. Since FUSE is merged into Linux Kernel 2.6.14, it seems reasonable to choose FUSE than LUFS. So the task now is to recompile a Linux Kernel version 2.6.14 and up with FUSE support. As far as how to compile the kernel, there are way too many articles detailing step by step howtos. Since this dedicated server is using FC3, I followed this article. If you have a kernel 2.6.14 and up and want to enable FUSE, simply add this into your kernel's .config file.

CONFIG_FUSE_FS=y

Reboot with the new FUSE-enabled kernel, then we're ready to use all the Filesystem based on FUSE. There were quite many. Since the focus is to mount FTP access as a directory, using FTP as keyword and search through the page brings us to two choices:

CurlFtpFs seems to be more feature-rich, so I went with it. Note that on SF's Project Detail, the Development Status is 3-Alpha, so use it with your own risk. Since I'm only working on occasional copying and retrieving of backups, and it works fine, I'm happy with it. Installation of CurlFtpFs is simple, given that libcurl and dependencies are installed correctly. These are the steps:

  • Download and extract the latest version of CurlFtpFs here.
  • Configure: ./configure
  • Compile: make
  • Install: make install

So it's done. Mounting procedure is as followed:

  • mkdir MountPoint (eg: mkdir /backup)
  • curlftpfs -o user=USERNAME:PASSWORD ftp://FTPHost/ MountPoint/
    (eg: curlftpfs -o user=testusr:mypass ftp://127.0.0.1/ /backup/)

Done. Now that FUSE is installed, here are some other interesting filesystems available under FUSE:

I was trying to get Flickrfs working has no success at the authentication part where I need to authorize the Flickr API to access my Flickr photos. If you succeed, please tell me how.

All Rights Reserved Copyright © 2008 Design by StyleShout and Clazh