eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'FTPSession':

Home

Documentation
www.exept.de
Everywhere
for:
[back]

Class: FTPSession


Inheritance:

   Object
   |
   +--AbstractTCPSession
      |
      +--AbstractFTPSession
         |
         +--FTPSession

Package:
stx:goodies/communication
Category:
Net-Communication-FTP
Version:
rev: 1.14 date: 2018/04/11 07:58:07
user: stefan
file: FTPSession.st directory: goodies/communication
module: stx stc-classLibrary: communication
Author:
Claus Atzkern
Claus Gittinger

Description:


Helper class for the FTPServer.

an FTP serverSession - subclass to add/change functionality

the server's functionality is limited (by purpose):
    mkdir   - never allowed (see doDelete:)
    rmdir   - never allowed (see doDelete:)
    rm      - never allowed (see doDelete:)

    put     - only allowed for new files 
              (i.e. existing files are never overwritten)

be aware, that this FTPSession allows a client to GET all files
which are readable by me (except for the white- and blacklists below).

To limit access to certain folders, you can explicitly whiteList
allowed folders (by setting whiteListedFolders) and/or exclude individual folders
via a blackList (setting blackListedFolders).

Whitelisting is done first, then blacklisting
i.e. it is possible to allow everything under '/foo/...' by adding '/foo' to the whitelist,
and still exclude individual subdirectories under it by adding (say) '/foo/bar/baz' to the blacklist.


Instance protocol:

basic ftp user commands
o  doDELETE: recursive
FOR NOW: DO NEVER delete, but always report an error

o  doLIST: longFormat
(comment from inherited method)
raise an error: must be redefined in concrete subclass(es)

o  doMKD: newDirectory
FOR NOW: DO NEVER create directory, but always report an error

o  doRETR: file onTo: outStream
(comment from inherited method)
raise an error: must be redefined in concrete subclass(es)

o  doSTORE: unique
FOR NOW: DO NEVER allow writing over an existing file

protocol operations
o  defaultDirectoryForUser: user

protocol testing
o  canChangeWorkingDirectory: aDirectory

o  checkPassword: aPassword for: aUser

o  loginUserNeedsPassword: aUser
checks whether user exists and need a password;
- if the user is not known by the system an exception is raised


Demonstration:


    FTPServer start.


    FTPServer startOnPort:portNr.



ST/X 7.2.0.0; WebServer 1.670 at bd0aa1f87cdd.unknown:8081; Sat, 20 Apr 2024 16:15:51 GMT