1ssh_sftpd(3) Erlang Module Definition ssh_sftpd(3)
2
3
4
6 ssh_sftpd - Specifies the channel process to handle an SFTP subsystem.
7
9 Specifies a channel process to handle an SFTP subsystem.
10
12 subsystem_spec(Options) -> Spec
13
14 Types:
15
16 Options =
17 [{cwd, string()} |
18 {file_handler, CbMod | {CbMod, FileState}} |
19 {max_files, integer()} |
20 {root, string()} |
21 {sftpd_vsn, integer()}]
22 Spec = {Name, {CbMod, Options}}
23 Name = string()
24 CbMod = atom()
25 FileState = term()
26
27 Is to be used together with ssh:daemon/[1,2,3]
28
29 The Name is "sftp" and CbMod is the name of the Erlang module
30 implementing the subsystem using the ssh_server_channel (re‐
31 places ssh_daemon_channel) behaviour.
32
33 Options:
34
35 cwd:
36 Sets the initial current working directory for the server.
37
38 file_handler:
39 Determines which module to call for accessing the file
40 server. The default value is ssh_sftpd_file, which uses the
41 file and filelib APIs to access the standard OTP file
42 server. This option can be used to plug in other file
43 servers.
44
45 max_files:
46 The default value is 0, which means that there is no upper
47 limit. If supplied, the number of filenames returned to the
48 SFTP client per READDIR request is limited to at most the
49 given value.
50
51 root:
52 Sets the SFTP root directory. Then the user cannot see any
53 files above this root. If, for example, the root directory
54 is set to /tmp, then the user sees this directory as /. If
55 the user then writes cd /etc, the user moves to /tmp/etc.
56
57 sftpd_vsn:
58 Sets the SFTP version to use. Defaults to 5. Version 6 is
59 under development and limited.
60
61
62
63Ericsson AB ssh 4.15.3 ssh_sftpd(3)