Some web hosting company do not offer shell access (SSH or Telnet) to your shared hosting account for security reasons, making it a bit harder for you to do regular file maintenance for your web account. Although the use of regular FTP client is adequate for most cases, some people still prefer to manipulate files directly using standard Unix tools (probably because of old habits).
Fortunately, there’s CurlFtpFS which allow you to mount remote ftp account as a standard filesystem on your Linux operating system.
Using CurlFtpFS
First of all you need to install CurlFtpFS, which in case of Ubuntu or Debian based operating system is to run ‘sudo apt-get install curlftpfs‘.
Alternatively, you can use Synaptic to install CurlFtpFS.
Assuming you’ve successfully installed curlftpfs, all you need to do in order to mount ftp locally is to to run these commands.
mkdir hostr
sudo curlftpfs -o allow_other ftp://user:pass@ftp.example.com host
user:pass is the username and password to log into ftp account.
After that, you can change your working directory to the mount-point and use the regular unix utilities to work on the files that normally accessible on the FTP protocol. After you’re done, you can unmount it by running the usual “sudo umount [mountpoint]” command
Using CurlFtpFS in fstab
You can add curlftpfs to fstab for automatic mounting by using this line :
curlftpfs#user:pass@ftp.example.com /mnt/host fuse rw,uid=500,user,noauto 0 0
Note: Please refer to CurlFtpFS website for further reference.
Thanks for reading this post, hopefully this will get you started to use curlftpfs FTP based filesystem in your Linux operating system.
[tags]filesystem,linux,debian,ubuntu,curl,fuse,mount,unix[/tags]
what’s the usage of that noauto?
and also i foud out there’s some ppl using
this options….
“fuse rw,allow_other,auto,user,_netdev 0 0”
without using “uid”
what the adv and disadvtg anyway?
great tutorial thanks…… But
sudo curlftpfs -o allow_other ftp://user:pass@ftp.example.com host
this command should b replaced by
sudo curlftpfs -o allow_other ftp://user:pass@ftp.example.com hostr
as the directory made was hostr(mkdir hostr) or the error would b
“fuse: bad mount point `host’: No such file or directory”
the ftp://user:password@host/ syntax lets any user on your system see username, password and what host your are connecting to.
Use a ~/.netrc file, and chmod it to 0600
Try to use LftpFS
Thanks for the info!
http://www.getftp.info
w00f w00f
Interesting article. Another way to do this is from the Places menu in Gnome. You can access remote systems via ftp, ssh, smb, and others.
Nice post :D, It is very convenient for us to do file transfer by applying that.