4Suite
™
API Documentation
►
Module
Ft
.
Server
.
Server
.
Ftp
.Session
######################################################################## # $Header: /var/local/cvsroot/4Suite/Ft/Server/Server/Ftp/Session.py,v 1.15 2005/04/11 16:51:12 jkloth Exp $
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
,
_
)
cmd_cwd
(
self
,
path
)
cmd_dele
(
self
,
filename
)
cmd_dummy
(
self
,
_
)
cmd_list
(
self
,
path
)
cmd_mkd
(
self
,
dirname
)
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
)
cmd_rmd
(
self
,
dirname
)
cmd_site
(
self
,
command
)
cmd_size
(
self
,
path
)
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
)
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
)
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
= {'%': 'application/x-trash', '323': 'text/h323', 'ai': 'application/postscript', 'aif': 'audio/x-aiff', 'aifc': 'audio/x-aiff', 'aiff': 'audio/x-aiff', 'art': 'image/x-jg', 'asc': 'text/plain', 'asf': 'video/x-ms-asf', 'asx': 'video/x-ms-asf', ...}
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