CurlFtpFS differentiates itself from other FTP filesystems because it features:
* SSLv3 and TLSv1 support
* connecting through tunneling HTTP proxies
* automatically reconnection if the server times out
* transform absolute symlinks to point back into the ftp file system
Install CurlFtpFS in Ubuntu
Code:
sudo apt-get install curlftpfs
Replacing the appropriate settings, mount the share with
Code:
sudo curlftpfs -o umask=0777,uid=500,gid=500,allow_other ftp://username:password@your.ftpserver.here /media/ftpmountedhere
Make sure that the location to mount to is already created and readable and writable by all users.
A better way is use mount and umount. To do this the following lines need to be added to /etc/fstab:
File:
/etc/fstabCode:
#mount
curlftpfs#user:password@server.tld/remote/path /mount/point fuse user,disable_eprt,rw,uid=500,allow_other,noauto 0 0
#un-mount
curlftpfs#user:password@server.tld/remote/path /mount/point fuse.curlftpfs user,disable_eprt,noauto
The first line allows mount to work, the second umount to work. Additional options are:
Code:
User and password : ftp://user:password@ftp/
Specific port : ftp://ftp:8585
Now, you should be able to:
Code:
mount /path/to/mountpoint
and
Code:
umount /path/to/mountpoint
Security Issues
Try to run the command line below:
Code:
ps aux | grep curlftpfs
OMG! my username and password of my ftp host is visible. I am very sensitive about this, I don’t want it to be so visible, what should I do?
You can create .netrc under root directory and modified the mount line in /etc/fstab.
1. Create
/root/.netrc and paste these lines in it.
Code:
machine ftp.byexamples.com
login myusername
password mypassword
2. Modified the user mode of the file
Code:
sudo chmod o-rw /root/.netrc
if you have more than one ftp server just need to change each server login to each line
Code:
machine 192.168.0.1 login xxxx password 12345
machine 192.168.0.2 login xxxx password 12345
3. Modified
/etc/fstabCode:
#mount
curlftpfs#user:password@server.tld/remote/path /mount/point fuse user,disable_eprt,rw,uid=500,allow_other,noauto 0 0
#un-mount
curlftpfs#user:password@server.tld/remote/path /mount/point fuse.curlftpfs user,disable_eprt,noauto
Although your
/root/.netrc is in plain text, but you will need to gain root privilege in order to access the file.
update /etc/rc.local
Code:
curlftpfs -o umask=0777,uid=500,gid=500,allow_other ftp.server.com /mount/path
All the best