.TH ssh_sftpd 3erl "ssh 4.10.8" "Ericsson AB" "Erlang Module Definition" .SH NAME ssh_sftpd \- Specifies the channel process to handle an SFTP subsystem. .SH DESCRIPTION .LP Specifies a channel process to handle an SFTP subsystem\&. .SH EXPORTS .LP .nf .B subsystem_spec(Options) -> Spec .br .fi .br .RS .LP Types: .RS 3 Options = .br [{cwd, string()} | .br {file_handler, CbMod | {CbMod, FileState}} | .br {max_files, integer()} | .br {root, string()} | .br {sftpd_vsn, integer()}] .br Spec = {Name, {CbMod, Options}} .br Name = string() .br CbMod = atom() .br FileState = term() .br .RE .RE .RS .LP Is to be used together with \fIssh:daemon/[1,2,3]\fR\& .LP The \fIName\fR\& is \fI"sftp"\fR\& and \fICbMod\fR\& is the name of the Erlang module implementing the subsystem using the ssh_server_channel (replaces ssh_daemon_channel) behaviour\&. .LP Options: .RS 2 .TP 2 .B \fIcwd\fR\&: Sets the initial current working directory for the server\&. .TP 2 .B \fIfile_handler\fR\&: Determines which module to call for accessing the file server\&. The default value is \fIssh_sftpd_file\fR\&, which uses the file and filelib APIs to access the standard OTP file server\&. This option can be used to plug in other file servers\&. .TP 2 .B \fImax_files\fR\&: The default value is \fI0\fR\&, which means that there is no upper limit\&. If supplied, the number of filenames returned to the SFTP client per \fIREADDIR\fR\& request is limited to at most the given value\&. .TP 2 .B \fIroot\fR\&: Sets the SFTP root directory\&. Then the user cannot see any files above this root\&. If, for example, the root directory is set to \fI/tmp\fR\&, then the user sees this directory as \fI/\fR\&\&. If the user then writes \fIcd /etc\fR\&, the user moves to \fI/tmp/etc\fR\&\&. .TP 2 .B \fIsftpd_vsn\fR\&: Sets the SFTP version to use\&. Defaults to 5\&. Version 6 is under development and limited\&. .RE .RE