def __init__(self, cmd_channel):
     #_Base.__init__(self, root, cmd_channel)
     FilesystemBase.__init__(self, "", cmd_channel)
     # initial cwd was set to "/" to emulate a chroot jail
     self.cwd = ""
     self.root = "/"
     self.ftproot = "/"
Ejemplo n.º 2
0
 def __init__(self, cmd_channel, client):
     FilesystemBase.__init__(self, 'osis', cmd_channel)
     self.cwd = "/"
     self.list = []
     self.name2path = {}
     self.ftproot = "/%s" % 'osis'
     self.client = client
     self.actors = [Text.toStr(a) for a in j.apps.system.contentmanager.getActors()]
Ejemplo n.º 3
0
 def __init__(self, cmd_channel, name2pathFunction, type, contentmanager):
     root = type
     FilesystemBase.__init__(self, root, cmd_channel)
     self.cwd = "/"
     self.list = []
     self.name2pathFunction = name2pathFunction
     self.name2path = {}
     self.type = type
     self.ftproot = "/%s" % type
     self.contentmanager = contentmanager
Ejemplo n.º 4
0
 def __init__(self, root, cmd_channel, ftproot, fsmanager):
     """
      - (str) ftproot: the root as how the ftp client should use it
      - (instance) cmd_channel: the FTPHandler class instance
     """
     FilesystemBase.__init__(self, root, cmd_channel)
     # Set initial current working directory.
     # By default initial cwd is set to "/" to emulate a chroot jail.
     # If a different behavior is desired (e.g. initial cwd = root,
     # to reflect the real filesystem) users overriding this class
     # are responsible to set cwd attribute as necessary.
     self.cmd_channel = cmd_channel
     self.cwd = ""
     self.ftproot = ftproot
     self.fsmanager = fsmanager
     self.cache = {}
Ejemplo n.º 5
0
 def __init__(self, root, cmd_channel, ftproot, fsmanager):
     """
      - (str) ftproot: the root as how the ftp client should use it
      - (instance) cmd_channel: the FTPHandler class instance
     """
     FilesystemBase.__init__(self, root, cmd_channel)
     # Set initial current working directory.
     # By default initial cwd is set to "/" to emulate a chroot jail.
     # If a different behavior is desired (e.g. initial cwd = root,
     # to reflect the real filesystem) users overriding this class
     # are responsible to set cwd attribute as necessary.
     self.cmd_channel = cmd_channel
     self.cwd = ""
     self.ftproot = ftproot
     self.fsmanager = fsmanager
     self.cache = {}
Ejemplo n.º 6
0
 def __init__(self, root, cmd_channel, ftproot, cwd, readonly=False):
     """
      - (str) root: the user "real" home directory (e.g. '/home/user')
      - (instance) cmd_channel: the FTPHandler class instance
     """
     FilesystemBase.__init__(self, root, cmd_channel)
     # Set initial current working directory.
     # By default initial cwd is set to "/" to emulate a chroot jail.
     # If a different behavior is desired (e.g. initial cwd = root,
     # to reflect the real filesystem) users overriding this class
     # are responsible to set _cwd attribute as necessary.
     self._cwd = '/'
     self._root = root
     self.cmd_channel = cmd_channel
     self.handler = None
     self.cwd = cwd  # @why cwd & _cwd
     self.cwdftp = ""
     self.ftproot = ftproot
     self.readonly = readonly
Ejemplo n.º 7
0
 def __init__(self, root, cmd_channel, ftproot, cwd, readonly=False):
     """
      - (str) root: the user "real" home directory (e.g. '/home/user')
      - (instance) cmd_channel: the FTPHandler class instance
     """
     FilesystemBase.__init__(self, root, cmd_channel)
     # Set initial current working directory.
     # By default initial cwd is set to "/" to emulate a chroot jail.
     # If a different behavior is desired (e.g. initial cwd = root,
     # to reflect the real filesystem) users overriding this class
     # are responsible to set _cwd attribute as necessary.
     self._cwd = '/'
     self._root = root
     self.cmd_channel = cmd_channel
     self.handler = None
     self.cwd = cwd  # @why cwd & _cwd
     self.cwdftp = ""
     self.ftproot = ftproot
     self.readonly = readonly