Table of Contents

Module: FTPServer Zope-2.2.1-src/ZServer/FTPServer.py

ZServer FTP Channel for use the medusa's ftp server.

FTP Service for Zope.

This server allows FTP connections to Zope. In general FTP is used to manage content. You can:

  • Create and delete Folders, Documents, Files, and Images

  • Edit the contents of Documents, Files, Images

In the future, FTP may be used to edit object properties.

FTP Protocol

The FTP protocol for Zope gives Zope objects a way to make themselves available to FTP services. See the lib/python/OFS/FTPInterface.py for more details.

FTP Permissions

FTP access is controlled by one permission: FTP access if bound to a role, users of that role will be able to list directories, and cd to them. Creating and deleting and changing objects are all governed by existing Zope permissions.

Permissions are to a certain extent reflected in the permission bits listed in FTP file listings.

FTP Authorization

Zope supports both normal and anonymous logins. It can be difficult to authorize Zope users since they are defined in distributed user databases. Normally, all logins will be accepted and then the user must proceed to cd to a directory in which they are authorized. In this case for the purpose of FTP limits, the user is considered anonymous until they cd to an authorized directory.

Optionally, users can login with a special username which indicates where they are defined. Their login will then be authenticated in the indicated directory, and they will not be considered anonymous. The form of the name is @ where path takes the form [/...] For example: amos@Foo/Bar This will authenticate the user amos in the directory /Foo/Bar. In addition the user's FTP session will be rooted in the authenticated directory, i.e. they will not be able to cd out of the directory.

The main reason to use the rooted FTP login, is to allow non-anonymous logins. This may be handy, if for example, you disallow anonymous logins, or if you set the limit for simultaneous anonymous logins very low.

Imported modules   
from FTPRequest import FTPRequest
from FTPResponse import make_response
from PubCore import handle
from ZServer import CONNECTION_LIMIT
from cStringIO import StringIO
import marshal
from medusa import asyncore, asynchat, filesys
from medusa.ftp_server import ftp_channel, ftp_server, recv_channel
from mimetypes import guess_type
import os
import stat
import string
import time
Functions   
handle_close
  handle_close 
handle_close ( self )

response and closure of channel is delayed.

Classes   
ContentReceiver

Write-only file object used to receive data from FTP

FTPLimiter

Rudimentary FTP limits. Helps prevent denial of service

FTPServer

FTP server for Zope.

zope_ftp_channel

Passes its commands to Zope, not a filesystem


Table of Contents

This document was automatically generated on Mon Sep 4 07:33:06 2000 by HappyDoc version r0_6