FTP

FTP allows to download but also and upload files from a server. Alternatively rcp the remote copy could be used.

Ftp servers

There are different ftp servers:

  1. Apacheoffers also a ftp module.

  2. emerge vsftpd to have a standalone ftp server can be installed by doing and is described in further detail.

Good is to choice for ftp is a program that gets maintained since ftp servers can be subjects for hackers.

Open and edit /etc/vsftpd/vsftpd.conf that holds the configuration.

It can either be standalone and watch incoming ftp requests (listen=Yes) or using xinetd for that (listen=No). Type man vsftpd.conf for help. There is a initscript rc-update add vsftpd default. Finally the directory shared by default and anonymous user is ~/ftp/ make sure the file system does also allow to access this directory. The use of FTP to make such a directory easily usable and visible but hide the rest of the computer with all unnecessary details for the up and download. In konqueror type ftp://192.168.1.34/ and you will see the contents of ~/ftp (assuming the correct IP address is given).

There is also a log file: /var/log/vsftpd.log

Ftp clients

To have a stand alone gui tool gftp

or FileZilla

Important

Since upload can take a while check in FileZilla window Transfer Queue the Queued files.

Or simply type in ftp://<Uri> into a browser.

lftp

lftp can be used to keep a remote in sync with local

lftp ftp://<username>:<password>@<url> -e "mirror -e --ignore-time -R <local dir><remote dir>; quit"

-e means delete remote files that are no more used

-R means transfer is local to remote

curlftpfs

Instead of dealing with an Ftp client curlftpfs mounts a Ftp server to the local filesystem where tools as unison can be used to sync.

To mount as regular user (If the password has characters as $ ! then use the escape character as \$ or \!)

curlftpfs ftp://<url>/ <local dir>/ -o user=<username>:<password>,utf8

or as root

curlftpfs -o allow_other ftp://<username>:<password>@<Url><Dir>

to unmount fusermount -u <Dir>

See https://wiki.gentoo.org/wiki/CurlFtpFS


Linurs Hosttech startpage