Package org.bluezoo.gumdrop.ftp.file
package org.bluezoo.gumdrop.ftp.file
Filesystem-based FTP handler implementations.
This package provides FTP handlers that map FTP operations to the local filesystem, with support for virtual paths, chroot jails, and role-based access control.
Key Components
Services (v2)
SimpleFTPService- Simple file-based FTP service with optional realm authenticationRoleBasedFTPService- FTP service with role-based access control and quota supportAnonymousFTPService- FTP service for anonymous public file distribution
Handlers and Supporting Classes
SimpleFTPHandler- Basic filesystem connection handlerRoleBasedFTPHandler- Handler with role-based access controlAnonymousFTPHandler- Handler for anonymous FTP accessBasicFTPFileSystem- Local filesystem implementation with chrootRoleAwareFTPFileSystem- Decorator that enforces role-based access at the filesystem operation level; activated viaRoleBasedFTPService.setFilesystemEnforcement(boolean)
Features
- Chroot-style isolation per user
- Configurable home directories
- Integration with quota management
- Virtual path mapping
- Hidden file filtering
Configuration Example
<realm id="ftpRealm" class="org.bluezoo.gumdrop.BasicRealm">
<property name="href">ftp-users.xml</property>
</realm>
<service class="org.bluezoo.gumdrop.ftp.file.RoleBasedFTPService">
<property name="realm" ref="#ftpRealm"/>
<property name="root-directory">/var/ftp/users</property>
<property name="welcome-message">Welcome to Gumdrop FTP</property>
<listener class="org.bluezoo.gumdrop.ftp.FTPListener" port="21"/>
</service>
Security
The handlers enforce strict path validation to prevent directory traversal attacks. Users are confined to their designated directories and cannot access files outside their scope.
- Author:
- Chris Burdess
- See Also:
-
ClassesClassDescriptionAnonymous FTP connection handler for public file distribution.FTP service for anonymous public file distribution.Concrete
FTPFileSystembacked by the local OS file system.Decorator that enforces role-based access control on anFTPFileSystem.FTP connection handler with role-based access control.FTP service with role-based access control.Simple FTP connection handler for demonstration purposes.FTP service for basic file-based access with optional realm authentication.