[manual index][section index]


ftpfs - file transfer protocol (FTP) file server


ftpfs [ -/dpq ] [ -m mountpoint ] [ -a password ] ftphost


Ftpfs connects to ftphost using the Internet's File Transfer Protocol, and makes the remote files visible at mountpoint (default: /n/ftp) in the current name space, for access by ordinary Inferno file operations. In other words, it is a protocol translator between FTP and 9P. The connection is shut down by unmounting the mount point; see bind(1). The ftphost can be any address acceptable to cs(8); the default network is tcp, and the default service is ftp (port 21).

Ftpfs will prompt for a user name and password as ftphost demands. If the FTP host supports `anonymous FTP' (ie, guest access), it will accept the user name anonymous and a conventional password (notionally the user's e-mail address). Given the -a option, ftpfs automatically logs in as anonymous with the password supplied, avoiding prompting.

By default, ftpfs uses a `passive' connection for file transfer: the remote system gives the local system a new address to call to fetch the data. This often works best for local systems behind firewalls that block incoming calls to arbitrary ports, but can fail for instance if the remote system does not support passive mode, or is itself behind such a firewall. The -p option forces `active' connection: the local system gives the remote machine an address on which to call it back to transfer the data.

Other options are:

Mount the remote machine's root directory on mountpoint, not the user's home directory (which is used by default).
Suppress the printing of chatter (`informational messages') from the remote server.
Display all FTP protocol transactions to allow a failure to connect to be debugged.

Ftpfs keeps a limited local cache of remote files and directories. The cache is kept consistent with file and directory operations by the local user through the current connection, but not with changes made by others on the remote site. Cached entries for a given directory can be flushed explicitly by accessing the name .flush.ftpfs in that directory.


Mount a remote machine and copy files from there to here.

mkdir here
ftpfs -a 'bloggs@' ftp.vitanuova.com
cp /n/ftp/package.tgz here
unmount /n/ftp


Temporarily cached files




Symbolic links are not supported.
Ftpfs does not implement `rename', forcing mv(1) to rename by copying.

FTPFS(4 ) Rev:  Tue Mar 31 02:42:39 GMT 2015