module documentation
(source)

An FTP protocol implementation
Interface ​IFinishable​Consumer A Consumer for producers that finish.
Interface ​IFTPShell An abstraction of the shell commands used by the FTP protocol for a given user account.
Interface ​IRead​File A file out of which bytes may be read.
Interface ​IWrite​File A file into which bytes may be written.
Class ​Anon​User​Denied​Error Raised when an anonymous user issues a command that will alter the filesystem
Class ​ASCIIConsumer​Wrapper Undocumented
Class ​Authorization​Error Raised when client authentication fails.
Class ​Bad​Cmd​Sequence​Error Raised when a client sends a series of commands in an illogical sequence.
Class ​Bad​Response Undocumented
Class ​Base​FTPRealm Base class for simple FTP realms which provides an easy hook for specifying the home directory for each user.
Class ​Cmd​Arg​Syntax​Error Raised when a command is called with wrong value or a wrong number of arguments.
Class ​Cmd​Not​Implemented​Error Raised when an unimplemented command is given to the server.
Class ​Cmd​Not​Implemented​For​Arg​Error Raised when the handling of a parameter for a command is not implemented by the server.
Class ​Cmd​Syntax​Error Raised when a command syntax is wrong.
Class ​Command​Failed Undocumented
Class ​Connection​Lost Undocumented
Class DTP No class docstring; 0/4 instance variable, 0/1 class variable, 2/15 methods documented
Class ​DTPFactory Client factory for data transfer process protocols.
Class ​File​Consumer A consumer for FTP input that writes data to a file.
Class ​File​Exists​Error Raised when attempted to override an existing resource.
Class ​File​Not​Found​Error Raised when trying to access a non existent file or directory.
Class FTP Protocol Interpreter for the File Transfer Protocol
Class ​FTPAnonymous​Shell An anonymous implementation of IFTPShell
Class ​FTPClient FTPClient is a client implementation of the FTP protocol which exposes FTP commands as methods which return Deferreds.
Class ​FTPClient​Basic Foundations of an FTP client.
Class ​FTPCmd​Error Generic exception for FTP commands.
Class ​FTPCommand Undocumented
Class ​FTPData​Port​Factory Factory for data connections that use the PORT command
Class ​FTPError Undocumented
Class ​FTPFactory A factory for producing ftp protocol instances
Class ​FTPFile​List​Protocol Parser for standard FTP file listings
Class ​FTPOverflow​Protocol FTP mini-protocol for when there are too many connections.
Class ​FTPRealm
Class ​FTPShell An authenticated implementation of IFTPShell.
Class ​Invalid​Path Internal exception used to signify an error during parsing a path.
Class ​Is​ADirectory​Error Raised when DELE is called on a path that is a directory.
Class ​Is​Not​ADirectory​Error Raised when RMD is called on a path that isn't a directory.
Class ​Permission​Denied​Error Raised when access is attempted to a resource to which access is not allowed.
Class ​Port​Connection​Error Undocumented
Class ​Protocol​Wrapper Undocumented
Class ​Sender​Protocol No class docstring; 0/2 instance variable, 2/8 methods documented
Class ​System​FTPRealm SystemFTPRealm uses system user account information to decide what the home directory for a particular avatarId is.
Class ​Unexpected​Data Undocumented
Class ​Unexpected​Response Undocumented
Function debug​Deferred Undocumented
Function decode​Host​Port Decode an FTP response specifying a host and port.
Function encode​Host​Port Undocumented
Function errno​To​Failure Map OSError and IOError to standard FTP errors.
Function parse​PWDResponse Returns the path from a response to a PWD command.
Function to​Segments Normalize a path, as represented by a list of strings each representing one segment of the path.
Constant ANON​_USER​_DENIED Undocumented
Constant AUTH​_FAILURE Undocumented
Constant BAD​_CMD​_SEQ Undocumented
Constant CANT​_OPEN​_DATA​_CNX Undocumented
Constant CLOSING​_DATA​_CNX Undocumented
Constant CMD​_NOT​_IMPLMNTD Undocumented
Constant CMD​_NOT​_IMPLMNTD​_FOR​_PARAM Undocumented
Constant CMD​_NOT​_IMPLMNTD​_SUPERFLUOUS Undocumented
Constant CMD​_OK Undocumented
Constant CNX​_CLOSED​_TXFR​_ABORTED Undocumented
Constant DATA​_CNX​_ALREADY​_OPEN​_START​_XFR Undocumented
Constant DATA​_CNX​_OPEN​_NO​_XFR​_IN​_PROGRESS Undocumented
Constant DIR​_STATUS Undocumented
Constant ENTERING​_EPSV​_MODE Undocumented
Constant ENTERING​_PASV​_MODE Undocumented
Constant ENTERING​_PORT​_MODE Undocumented
Constant EXCEEDED​_STORAGE​_ALLOC Undocumented
Constant FEAT​_OK Undocumented
Constant FILE​_EXISTS Undocumented
Constant FILE​_NOT​_FOUND Undocumented
Constant FILE​_STATUS Undocumented
Constant FILE​_STATUS​_OK​_OPEN​_DATA​_CNX Undocumented
Constant FILENAME​_NOT​_ALLOWED Undocumented
Constant GOODBYE​_MSG Undocumented
Constant GUEST​_LOGGED​_IN​_PROCEED Undocumented
Constant GUEST​_NAME​_OK​_NEED​_EMAIL Undocumented
Constant HELP​_MSG Undocumented
Constant IS​_A​_DIR Undocumented
Constant IS​_NOT​_A​_DIR Undocumented
Constant MKD​_REPLY Undocumented
Constant NAME​_SYS​_TYPE Undocumented
Constant NEED​_ACCT​_FOR​_LOGIN Undocumented
Constant NEED​_ACCT​_FOR​_STOR Undocumented
Constant NOT​_LOGGED​_IN Undocumented
Constant OPTS​_NOT​_IMPLEMENTED Undocumented
Constant PAGE​_TYPE​_UNK Undocumented
Constant PERMISSION​_DENIED Undocumented
Constant PWD​_REPLY Undocumented
Constant REQ​_ACTN​_ABRTD​_FILE​_UNAVAIL Undocumented
Constant REQ​_ACTN​_ABRTD​_INSUFF​_STORAGE Undocumented
Constant REQ​_ACTN​_ABRTD​_LOCAL​_ERR Undocumented
Constant REQ​_ACTN​_NOT​_TAKEN Undocumented
Constant REQ​_FILE​_ACTN​_COMPLETED​_OK Undocumented
Constant REQ​_FILE​_ACTN​_PENDING​_FURTHER​_INFO Undocumented
Constant RESPONSE Undocumented
Constant RESTART​_MARKER​_REPLY Undocumented
Constant SERVICE​_READY​_IN​_N​_MINUTES Undocumented
Constant SVC​_CLOSING​_CTRL​_CNX Undocumented
Constant SVC​_NOT​_AVAIL​_CLOSING​_CTRL​_CNX Undocumented
Constant SVC​_READY​_FOR​_NEW​_USER Undocumented
Constant SYNTAX​_ERR Undocumented
Constant SYNTAX​_ERR​_IN​_ARGS Undocumented
Constant SYS​_STATUS​_OR​_HELP​_REPLY Undocumented
Constant TOO​_MANY​_CONNECTIONS Undocumented
Constant TXFR​_COMPLETE​_OK Undocumented
Constant TYPE​_SET​_OK Undocumented
Constant USR​_LOGGED​_IN​_PROCEED Undocumented
Constant USR​_NAME​_OK​_NEED​_PASS Undocumented
Constant WELCOME​_MSG Undocumented
Variable grp Undocumented
Variable pwd Undocumented
Class _​File​Reader Undocumented
Class _​File​Writer Undocumented
Class _​Passive​Connection​Factory Undocumented
Function _getgroups Return the primary and supplementary groups for the given UID.
Function _is​Globbing​Expression Helper for checking if a FTPShell `segments` contains a wildcard Unix expression.
Function _test​Permissions checks to see if uid has proper permissions to access path with mode
Function _unwrap​First​Error Undocumented
Variable _months Undocumented
Variable _test​Translation Undocumented
def debugDeferred(self, *_): (source)

Undocumented

def decodeHostPort(line): (source)
Decode an FTP response specifying a host and port.
Returns
a 2-tuple of (host, port).
def encodeHostPort(host, port): (source)

Undocumented

def errnoToFailure(e, path): (source)
Map OSError and IOError to standard FTP errors.
def parsePWDResponse(response): (source)

Returns the path from a response to a PWD command.

Responses typically look like:

    257 "/home/andrew" is current directory.

For this example, I will return '/home/andrew'.

If I can't find the path, I return None.

def toSegments(cwd, path): (source)
Normalize a path, as represented by a list of strings each representing one segment of the path.
ANON_USER_DENIED: str = (source)

Undocumented

Value
'550.3'
AUTH_FAILURE: str = (source)

Undocumented

Value
'530.2'
BAD_CMD_SEQ: str = (source)

Undocumented

Value
'503'
CANT_OPEN_DATA_CNX: str = (source)

Undocumented

Value
'425'
CLOSING_DATA_CNX: str = (source)

Undocumented

Value
'226.1'
CMD_NOT_IMPLMNTD: str = (source)

Undocumented

Value
'502.1'
CMD_NOT_IMPLMNTD_FOR_PARAM: str = (source)

Undocumented

Value
'504'
CMD_NOT_IMPLMNTD_SUPERFLUOUS: str = (source)

Undocumented

Value
'202'
CMD_OK: str = (source)

Undocumented

Value
'200.1'
CNX_CLOSED_TXFR_ABORTED: str = (source)

Undocumented

Value
'426'
DATA_CNX_ALREADY_OPEN_START_XFR: str = (source)

Undocumented

Value
'125'
DATA_CNX_OPEN_NO_XFR_IN_PROGRESS: str = (source)

Undocumented

Value
'225'
DIR_STATUS: str = (source)

Undocumented

Value
'212'
ENTERING_EPSV_MODE: str = (source)

Undocumented

Value
'229'
ENTERING_PASV_MODE: str = (source)

Undocumented

Value
'227'
ENTERING_PORT_MODE: str = (source)

Undocumented

Value
'200.3'
EXCEEDED_STORAGE_ALLOC: str = (source)

Undocumented

Value
'552'
FEAT_OK: str = (source)

Undocumented

Value
'211.2'
FILE_EXISTS: str = (source)

Undocumented

Value
'550.6'
FILE_NOT_FOUND: str = (source)

Undocumented

Value
'550.1'
FILE_STATUS: str = (source)

Undocumented

Value
'213'
FILE_STATUS_OK_OPEN_DATA_CNX: str = (source)

Undocumented

Value
'150'
FILENAME_NOT_ALLOWED: str = (source)

Undocumented

Value
'553'
GOODBYE_MSG: str = (source)

Undocumented

Value
'221.2'
GUEST_LOGGED_IN_PROCEED: str = (source)

Undocumented

Value
'230.2'
GUEST_NAME_OK_NEED_EMAIL: str = (source)

Undocumented

Value
'331.2'
HELP_MSG: str = (source)

Undocumented

Value
'214'
IS_A_DIR: str = (source)

Undocumented

Value
'550.7'
IS_NOT_A_DIR: str = (source)

Undocumented

Value
'550.4'
MKD_REPLY: str = (source)

Undocumented

Value
'257.2'
NAME_SYS_TYPE: str = (source)

Undocumented

Value
'215'
NEED_ACCT_FOR_LOGIN: str = (source)

Undocumented

Value
'332'
NEED_ACCT_FOR_STOR: str = (source)

Undocumented

Value
'532'
NOT_LOGGED_IN: str = (source)

Undocumented

Value
'530.1'
OPTS_NOT_IMPLEMENTED: str = (source)

Undocumented

Value
'502.2'
PAGE_TYPE_UNK: str = (source)

Undocumented

Value
'551'
PERMISSION_DENIED: str = (source)

Undocumented

Value
'550.2'
PWD_REPLY: str = (source)

Undocumented

Value
'257.1'
REQ_ACTN_ABRTD_FILE_UNAVAIL: str = (source)

Undocumented

Value
'450'
REQ_ACTN_ABRTD_INSUFF_STORAGE: str = (source)

Undocumented

Value
'452'
REQ_ACTN_ABRTD_LOCAL_ERR: str = (source)

Undocumented

Value
'451'
REQ_ACTN_NOT_TAKEN: str = (source)

Undocumented

Value
'550.5'
REQ_FILE_ACTN_COMPLETED_OK: str = (source)

Undocumented

Value
'250'
REQ_FILE_ACTN_PENDING_FURTHER_INFO: str = (source)

Undocumented

Value
'350'
RESPONSE = (source)

Undocumented

Value
{RESTART_MARKER_REPLY: '110 MARK yyyy-mmmm',
 SERVICE_READY_IN_N_MINUTES: '120 service ready in %s minutes',
 DATA_CNX_ALREADY_OPEN_START_XFR: '125 Data connection already open, starting tr
ansfer',
 FILE_STATUS_OK_OPEN_DATA_CNX: '150 File status okay; about to open data connect
ion.',
 CMD_OK: '200 Command OK',
...
RESTART_MARKER_REPLY: str = (source)

Undocumented

Value
'100'
SERVICE_READY_IN_N_MINUTES: str = (source)

Undocumented

Value
'120'
SVC_CLOSING_CTRL_CNX: str = (source)

Undocumented

Value
'221.1'
SVC_NOT_AVAIL_CLOSING_CTRL_CNX: str = (source)

Undocumented

Value
'421.1'
SVC_READY_FOR_NEW_USER: str = (source)

Undocumented

Value
'220.1'
SYNTAX_ERR: str = (source)

Undocumented

Value
'500'
SYNTAX_ERR_IN_ARGS: str = (source)

Undocumented

Value
'501'
SYS_STATUS_OR_HELP_REPLY: str = (source)

Undocumented

Value
'211.1'
TOO_MANY_CONNECTIONS: str = (source)

Undocumented

Value
'421.2'
TXFR_COMPLETE_OK: str = (source)

Undocumented

Value
'226.2'
TYPE_SET_OK: str = (source)

Undocumented

Value
'200.2'
USR_LOGGED_IN_PROCEED: str = (source)

Undocumented

Value
'230.1'
USR_NAME_OK_NEED_PASS: str = (source)

Undocumented

Value
'331.1'
WELCOME_MSG: str = (source)

Undocumented

Value
'220.2'

Undocumented

Undocumented

def _getgroups(uid): (source)
Return the primary and supplementary groups for the given UID.
Parameters
uid:intUndocumented
def _isGlobbingExpression(segments=None): (source)

Helper for checking if a FTPShell `segments` contains a wildcard Unix expression.

Only filename globbing is supported. This means that wildcards can only be presents in the last element of `segments`.

Parameters
segments:listList of path elements as used by the FTP server protocol.
Returns
BooleanTrue if `segments` contains a globbing expression.
def _testPermissions(uid, gid, spath, mode='r'): (source)
checks to see if uid has proper permissions to access path with mode
Parameters
uid:intnumeric user id
gid:intnumeric group id
spath:strthe path on the server to test
mode:str'r' or 'w' (read or write)
Returns
boolTrue if the given credentials have the specified form of access to the given path
def _unwrapFirstError(failure): (source)

Undocumented

_months: list = (source)

Undocumented

_testTranslation = (source)

Undocumented