Do you often access your ftp site to make some simple changes or your share some documents that you wish to be accessible from anywhere.

You can make your access to your ftp resource easier with curlftpfs linux utility. This fantastic utility allows you to mount your ftp site to any directory withing your linux filesystem.


First install curlftpfs package. On Debian or Ubuntu it would simple as:

apt-get install curlftpfs

Mount ftp directory

What needs to be done next is to create a mount point:

# mkdir /mnt/my_ftp

next use curlftpfs to mount your remote ftp site. Suppose my access credentials are as follows:

  • username: ftp-user
  • password: ftp-pass
  • host/IP: my-ftp-location.local

the actual curlftpfs mount command would be:

# curlftpfs ftp-user:This email address is being protected from spambots. You need JavaScript enabled to view it. /mnt/my_ftp/


ftp uses unencrypted passwords so anyone can intercept your password without much effort. Therefore use curlftpfs in combination with SSL certificates if your are not mounting some local LAN ftp server.

On Debian you can mount ftp using curlftpfs as a root and this allows only root user to access ftp mount. No other users are allowed since by default only users that mounts has and access to mount directory. When mounting ftp as a non-root user you may get a following error message:

fuse: failed to open /dev/fuse: Permission denied

Rather that changing permissions of /dev/fuse you can allow other users to access ftp mount directory with an curlftpfs's option allow_other. The command will look similar to the one below:

# curlftpfs -o allow_other ftp-user:This email address is being protected from spambots. You need JavaScript enabled to view it. /mnt/my_ftp/

Subscribe to RSS and NEWSLETTER and receive latest Linux news, jobs, career advice and tutorials.

Mount ftp with curlftpfs using /etc/fstab

Since we do not want put any passwords to /etc/fstab file we will first create a /root/.netrc file with a ftp username and password using this format:

machine my-ftp-location.local
login ftp-user
password ftp-pass

Now change permissions of this file to 600:

# chmod 600 /root/.netrc

Check uid and gid of your non-root user. This user will have a access to ftp mount directory:

$ id

In the next step add a following line to your /etc/fstab file ( change credentials for your ftp user ):

curlftpfs#my-ftp-location.local /mnt/my_ftp fuse allow_other,uid=1000,gid=1000,umask=0022 0 0

Now mount ftp with:

mount -a
Submit your RESUME, create a JOB ALERT or subscribe to RSS feed.
Subscribe to NEWSLETTER and receive latest news, jobs, career advice and tutorials.
Get extra help by visiting our LINUX FORUM or simply use comments below.

Comments and Discussions
Linux Forum