Mount a FTP connection in your file system on Ubuntu

I was just looking for an easy and strict way to process files and directories via FTP (in a shell script) and stumbled over the CurlFtpFS, which allows you to mount an FTP connection as part of your file system. Extremely nice and elaborated solution these guys implemented. You can either mount it using sudo e.g. in /mnt/ftp/hostname or simply in your home directory, e.g. “~/ftp”. As Bob Ross used to say: “And it’s really that simple”.

Installation

sudo aptitude install curlftpfs

Mount

# Create a directory to have a mount point
mkdir ~/ftp

# To directly connect with username and password in the command line:
sudo curlftpfs username:password@host.or.domain ~/ftp

# If you want to type the password in the shell:
sudo curlftpfs -o user="username" host.or.domain ~/ftp

# To check if's mounted
mount
# You get a list that should include the line like:
#   curlftpfs#.... on ..../ftp type fuse (rw,nosuid,nodev,user=....)

Unnount

sudo umount ~/ftp

Annotation: I added sudo because you very likely cannot unmount the drive without root permissions, even not in your home folder.

This entry was posted in Uncategorized and tagged , , , , . Bookmark the permalink.

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>

Comment moderation is enabled. Your comment may take some time to appear.