[manual index][section index]

NAME

sftpfs - sftp client file server

SYNOPSIS

mount { sftpfs [ -dD ] [ -i idlesecs ] [ -s sshcmd | addr ] [ remotepath ] } mtpt

DESCRIPTION

Sftpfs translates between styx messages and sftp (version 3) messages. If addr is specified, ssh(1) is executed to connect to the address request the sftp subsystem. Otherwise sshcmd specified with -s is executed. The home directory on the remote server is mounted by default, another path (relative to the home directory, or an absolute path) can be specified by remotepath. Option -d causes debug messages to be printed. Option -D causes sftp message traces to be printed.

Sftpfs does not immediately connect to the server. It answers the ``version'' and ``attach'' styx messages without sftp connection. Only for later styx messages (e.g. ``walk'') will a connection be started. If the connection is idle for more than idlesecs seconds, and no files are open, the connection is closed. This makes it possible to start sftpfs at boot time without it using resources immediately. The default value is 15 minutes. With zero or a negative value sftpfs never disconnects idle connections.

Styx requests are handled ``asynchronously'', meaning they are translated into an sftp request and queued for later response. In the mean time a next styx styx is processed. This should result in decent performance of concurrent styx requests over high latency connections.

EXAMPLE

Mount files from ``dis'':
	mount -c {sftpfs dis} /n/dis

SEE ALSO

mount(1), ssh(1), fcp(1).
``SSH File Transfer Protocol'' , draft-ietf-secsh-filexfer-02.txt

SOURCE

/appl/cmd/sftpfs.b

BUGS

Some styx requests require multiple sftp requests. The styx operation may no longer be atomic. For wstat(5) the attributes are set first, then the name is changed. A null wstat(5) has no equivalent sftp operation so returns success immediately.
Open or create with ORCLOSE, DMAPPEND, or DMEXCL is not supported and returns an error.
Sftp servers only send numeric uids and gids. Sftp does not currently have a mechanism to translate them to names.

SFTPFS(4 ) Rev:  Wed Feb 22 04:14:06 GMT 2023