by JoKeru

FTPfs / mount remote FTP on local server with curlftpfs

So you're managing / maintaining (from the terminal) some FTP services and you'd like to have a quick access to each and every one of them without a login ?

Here's how you do it:

\$ apt-get install curlftpfs  
\$ mkdir /root/ftp1  
\$ curlftpfs 'ftp-username':'ftp-password'@ftp-server /root/ftp1/  
\$ cd /root/ftp1/ && ls  

Note: if the user or password contains the '@' character, you should use the following command:

\$ curlftpfs -o user='ftp-username:ftp-password' ftp-server

To make the changes permanent, you also need to:

\$ echo 'machine ftp-server' \> /root/.netrc  
\$ echo 'login ftp-username' \>\> /root/.netrc  
\$ echo 'password ftp-password' \>\> /root/.netrc  
\$ chmod 0600 /root/.netrc  
\$ echo 'curlftpfs\#ftp-server /root/ftp1 fuse umask=0022 0 0' \>\>
\$ mount -a