P6Ftpd
Platform 6 File Transfer Protocol Consumer is an ftp server that listens for and accepts plain or secure socket connections and provides a virtual file system for the collection and delivery of files.
FTP can be used in three different modes:
- Plain FTP: insecure as described in the RFC 959.
- Explicit FTPS: secure extension added to the classic FTP protocol. First described in the RFC 2228. The connection starts as a classic FTP dialog until the client ask explicitly a secure connection.
- Implicit FTPS: Non standard. Use a different port than FTP. The FTP server run only in secure mode using a SSL connection.
The FTP server can only be one of these configurations:
- Plain FTP
- Plain FTP + Explicit FTPS
- Explicits FTPS
- Implicit FTPS
The FTPS Wikipedia article is pretty good on this topic: https://en.wikipedia.org/wiki/Ftps.
URI Format¶
p6ftpd:///[?options]
You can append query options to the URI in the following format:
?options=value&option2=value&...
Query parameters¶
Name | Description | Default | Type |
---|---|---|---|
port | SSH listen port. | 2221 | Numeric |
root | Path to the root of the users virtual file systems | file://${B2BOX_DATA}/resources/ftpd | URI |
auth | Authentication mechanism. (FILE or P6AUTH) | FILE | String |
ftpsMode | Mode of the FTP server, see above | explicit | String |
ftpsCertPath | Path to the PEM encoded certificate file | file://${B2BOX_DATA}/resources/certificates/publickey.pem | URI |
ftpsKeyPath | Path to the PEM private key file | file://${B2BOX_DATA}/resources/certificates/privatekey.pem | URI |
passiveRangeFrom | Passive port range. (From) | 2218 | Numeric |
passiveRangeTo | Passive port range. (To) | 2220 | Numeric |
userMaxSession | Maximum number of session per user | 8 | Numeric |
userMaxSessionPerIp | Maximum number of session per user and ip | 4 | Numeric |
Warning
Passive port range Default to 2218-2220. You shouldn’t change this. If you do, don’t make it smaller !
sftpMode¶
One of the following:
- plain
- implicit
- explicit
- explicitAndPlain
Note
You should use explicit as this is the only standard secured mode
Note
FILE authentication is provided for simple backward compatibility with b2box5
Authentication¶
FILE
The following folder structure must exists below the defines {root}
conf/users
Note
The component will auto create the folder structure if it does not exist.
To create a user, simply create a text file named userName.pwd in users. Inside this file, put the password in clear (namespace will be ignored).
P6AUTH
Not currently supported. (Will defer all authentication to p6auth)
Using FTP Consumer Events
See: See: Using FTP Consumer Events
Examples¶
from('p6ftpd:///') .description('FTP Listener') .to("log:p6.ftpd") .routeId('FTP_Listener')