4Suite™ API Documentation

# ► Module Ft.Server.Server.Ftp.Session

Repository exposed as FTP session
Copyright 2005 Fourthought, Inc. (USA).
Detailed license and copyright information: http://4suite.org/COPYRIGHT
Project home, documentation, distributions: http://4suite.org/

Classes: Session |  |  |  | Functions: got_pass, got_user, permcheck |  |  |  | Fields: IMT_MAP, SCHEMA_NSS, authmethods, chrootdir, do_debug, do_log, emulate_posix, i, initial_msg, initial_wd, logfile, methods, modules, permmethods, port, rbufsize, sbufsize, sessions, timeout_data, timeout_session

## Classes

class Session

### Methods

__init__(self, rfile, wfile, client_address, server)
absolutePath(self, path)
close_datasock(self)
cmd_abor(self, _)
cmd_appe(self, filename)
cmd_cdup(self, _)
Overriden for 4SS
cmd_cwd(self, path)
Overriden for 4Suite Server
cmd_dele(self, filename)
Overriden for 4SS
cmd_dummy(self, _)
cmd_list(self, path)
Overidden for 4SS
cmd_mkd(self, dirname)
Overidden for 4SS
cmd_noop(self, _)
cmd_pass(self, password)
cmd_pasv(self, _)
cmd_port(self, port_id)
cmd_pwd(self, _)
cmd_quit(self, _)
cmd_rest(self, pos)
cmd_retr(self, filename)
cmd_retr1(self, path)
Overriden for 4SS
cmd_rmd(self, dirname)
Overidden for 4SS
cmd_site(self, command)
Overiden to permit 4SS specific commands
cmd_size(self, path)
Overriden for 4SS
cmd_stor(self, filename)
cmd_syst(self, _)
cmd_user(self, username)
create_nonpasv_datasock(self)
create_pasv_datasock(self)
docmd(self, cmd)
# parses the command and eventually calls the appropriate routine
log_date_time_string(self)
Create a time string suitable for Common Log Format. [dd/mmm/yyyy:HH:MM:SS ZZZZZ] dd - Day of the month as a decimal number [01,31] mmm - Abbreviated month name yyyy - Year with century as a decimal number HH - Hour (24-hour clock) as a decimal number [00,23] MM - Minute as a decimal number [00,59] SS - Second as a decimal number [00,61] ZZZZZ - The time-zone as hour offset from GMT in (+/-)HHMM format
log_error(self, code, msg)
log_ftp_command(self, cmd, args)
log_ftp_message(self, msg)
log_serverResponse(self, msg)
loop(self)
loop1(self)
reply(self, x)
replymessage(self, n, x)
stor_or_appe(self, filename, comm)
Overriden for 4SS
unixDirListing(self, parent)
v2fs(self, f)

### Fields

threading = 0

## Functions

got_pass(username, password, session, sessions)
got_user(username, session, sessions)
permcheck(f, user, group, session, operation)

## Fields

IMT_MAP = {'.gif': 'image/gif', '.htm': 'text/html', '.html': 'text/html', '.jpeg': 'image/jpeg', '.jpg': 'image/jpeg', '.png': 'image/png', '.rdf': 'text/xml', '.svg': 'image/svg', '.xhtml': 'text/html', '.xml': 'text/xml', ...}
SCHEMA_NSS = 'http://schemas.4suite.org/4ss'
authmethods = [(<function got_user>, <function got_pass>)]
chrootdir = ''
do_debug = 1
do_log = 0
emulate_posix = 1
i = 'auth_4SS_module'
initial_msg = 'Welcome to the 4Suite Server FTP interface'
initial_wd = '/'
logfile = ''
methods = ['Error', 'FtServerServerException', 'GetRepository', '__builtins__', '__doc__', '__file__', '__name__', 'got_pass', 'got_user', 'os', 'sha']
modules = ['auth_4SS_module']
permmethods = []
port = 2122
rbufsize = 16000
sbufsize = 16000
sessions = {}
timeout_data = 120
timeout_session = 300