Howto: Mount a ftp drive in Ubuntu

When working with websites, you often need to move files to-and-fro a ftp server. This is usually done using a dedicated ftp application such as gftp. In this long run, this is a very time consuming process so why not just mount the ftp drive as a directory in your home folder?

The first thing we need to do is to get the package curlftpfs

sudo apt-get install curlftpfs

To mount the content of your ftp server at ftp.yourdomain.com in the directory ~/ftpfolder/ simply issue the command

curlftpfs user:pass@ftp.yourdomain.com ~/ftpfolder/

Unmounting is done in the usual way

sudo umount ~/ftpfolder/
Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Google

17 thoughts on “Howto: Mount a ftp drive in Ubuntu

  1. Nice – Issuing FTP commands by hand has always sucked. I normally use ncftp but this seems easier. How about autofs – I haven’t googled it yet but there must be a autofs implementation?

  2. Pingback: Howto: Mount a ftp drive in Ubuntu at hartvig.de « www.MICKOTOOLE.com

  3. Great blog post, however only some of the points were actually treated really good, I think digging deep for the topic to make it more informative will really help, will be looking forward for more information

  4. hey!
    I did it also! great thanks man! Now I can mount the ftp directory to my local linux.
    But but but…. wait!

    Everytime i do some copying into that local (mounted folder)…
    It said “cp Closing Input/Output Error….”

    huh?? Does anyone leave curlftpfs because of this error message as well?

  5. @g
    I used to get this error message as well, but the version I am using at the moment (0.6.1 on a debian-based system) have not caused problems.

  6. need to share this. I created folder x and tried to mount an embedded device’s ftp server to that folder in order to speed up development debugging cycles.
    This resulted in an “access denied” error of some sort. I thought maybe I should create that folder elsewhere and deleted it with rm x -r. Well, evidently despite the error, the mounting DID work and x was in fact mounted as root to the target’s filesystem, this command wiped the target clean, lol.

  7. Great tutorial! This works for auditioning music files over FTP. For example, if you have a SHOUTcast radio station and use Centova Cast auto dj, it’s hard to listen to the files on your server when making playlists. But if you mount the server as a local folder, those mp3′s will then look like local files to music players, so you can play them in VLC or Audacious, etc. Of course, FTP isn’t built for streaming so you’ll get some stuttering, but it still works for quick-and-dirty auditioning of MP3′s on a remote FTP server. Cool!

  8. Thanks! this will make ftp a lot more convenient. However, be careful when you use clear text passwords in your commands as they will be logged in the command history. But then again, ftp itself is very insecure~ as it sends everything unencrypted. Maybe curlftp has an option to use a credential file that only you can read.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>